changeset 640:7e1a59fefa0d

Moved the code part that skips themes to a better place. This let us paint empty charts with no themes at all. flys-artifacts/trunk@2021 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 27 May 2011 10:03:07 +0000
parents deb5e9840813
children ab9b6cae0d0d
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java
diffstat 2 files changed, 12 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Fri May 27 09:47:13 2011 +0000
+++ b/flys-artifacts/ChangeLog	Fri May 27 10:03:07 2011 +0000
@@ -1,3 +1,11 @@
+2011-05-27  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java:
+	  Moved the code part that skips themes right after the part that sets the
+	  master artifact for the OutGenerator. We need this master artifact to
+	  display empty charts - master artifact is used to create titles and
+	  axes.
+
 2011-05-27  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java	Fri May 27 09:47:13 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java	Fri May 27 10:03:07 2011 +0000
@@ -190,10 +190,6 @@
             for (int i = 0; i < size; i++) {
                 ManagedFacet theme = themeList.get(i);
 
-                if (theme.getActive() == 0) {
-                    continue;
-                }
-
                 if (theme == null) {
                     log.debug("Theme is empty - no output is generated.");
                     continue;
@@ -219,6 +215,10 @@
                 Artifact artifact = getArtifact(art, context);
                 generator.setMasterArtifact(artifact);
 
+                if (theme.getActive() == 0) {
+                    continue;
+                }
+
                 generator.doOut(
                     artifact,
                     facetName,

http://dive4elements.wald.intevation.org