[PATCH 1 of 5] Use the updated default subtitle or the 'old' one from chart settings

Wald Commits scm-commit at wald.intevation.org
Fri Mar 7 11:17:14 CET 2014


# HG changeset patch
# User Raimund Renkert <rrenkert at intevation.de>
# Date 1394186986 -3600
# Branch minfo-opt
# Node ID 8c20f16ab6504fdda108ab5877921dae6af56751
# Parent  842f3a5a89b05891ae3d5a3353bf10e8cfb7c7e0
Use the updated default subtitle or the 'old' one from chart settings.

diff -r 842f3a5a89b0 -r 8c20f16ab650 artifacts/src/main/java/org/dive4elements/river/exports/ChartGenerator2.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ChartGenerator2.java	Thu Mar 06 14:10:24 2014 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/ChartGenerator2.java	Fri Mar 07 11:09:46 2014 +0100
@@ -685,7 +685,16 @@
         ChartSettings chartSettings = getChartSettings();
 
         if (chartSettings != null) {
-            return getChartSubtitle(chartSettings);
+            String subTitle = getChartSubtitle(chartSettings);
+            String defSubTitle = getDefaultChartSubtitle();
+            if (defSubTitle != null &&
+                !defSubTitle.isEmpty() &&
+                !subTitle.equals(defSubTitle)) {
+                return defSubTitle;
+            }
+            else {
+                return subTitle;
+            }
         }
 
         return getDefaultChartSubtitle();


More information about the Dive4elements-commits mailing list