aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2005-08-12 08:40:00 +0000
committerJeremias Maerki <jeremias@apache.org>2005-08-12 08:40:00 +0000
commite456364d25d04780f25b83dffe7164908735b41a (patch)
treebb5fcede890fdfbe4a0dbfa8b6e0f80b4396775d /src/java/org
parentc7a832a5ec3b521e06fa4215037d926e3d7cd941 (diff)
downloadxmlgraphics-fop-e456364d25d04780f25b83dffe7164908735b41a.tar.gz
xmlgraphics-fop-e456364d25d04780f25b83dffe7164908735b41a.zip
Fix regression that caused duplicate IDs when Reload was pressed in the AWT Viewer. The Fop instance should only be used for one single rendering run. The regression was caused by the introduction of a member variable for the FOTreeBuilder which is used to fetch the rendering results.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@232236 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org')
-rw-r--r--src/java/org/apache/fop/render/awt/viewer/PreviewPanel.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/java/org/apache/fop/render/awt/viewer/PreviewPanel.java b/src/java/org/apache/fop/render/awt/viewer/PreviewPanel.java
index bc63c14a9..b568ddeb2 100644
--- a/src/java/org/apache/fop/render/awt/viewer/PreviewPanel.java
+++ b/src/java/org/apache/fop/render/awt/viewer/PreviewPanel.java
@@ -289,9 +289,8 @@ public class PreviewPanel extends JPanel {
return;
}
- if (fop == null) {
- fop = new Fop(Constants.RENDER_AWT, foUserAgent);
- }
+ //Always recreate the Fop instance. It is a use-once only.
+ fop = new Fop(Constants.RENDER_AWT, foUserAgent);
pagePanels = null;