Mercurial > dive4elements > river
changeset 7805:8c20f16ab650 minfo-opt
Use the updated default subtitle or the 'old' one from chart settings.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Fri, 07 Mar 2014 11:09:46 +0100 |
parents | 842f3a5a89b0 |
children | 7ac103a49e35 |
files | artifacts/src/main/java/org/dive4elements/river/exports/ChartGenerator2.java |
diffstat | 1 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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();