changeset 6379:9d5f09698d81

Search the river name also in the map.river state
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 21 Jun 2013 10:20:28 +0200
parents 2ad7f3ada1dc
children dc23ffb9d82c
files gwt-client/src/main/java/org/dive4elements/river/client/client/ui/map/MapPrintPanel.java
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/map/MapPrintPanel.java	Thu Jun 20 17:55:18 2013 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/map/MapPrintPanel.java	Fri Jun 21 10:20:28 2013 +0200
@@ -285,7 +285,7 @@
         url.append("&" + toJavaEncodedString(MSG.getString(MAPFISH_RIVER)) + "=" + river);
     }
 
-    // Copy of DatacageWindow's findRiver
+    // Copy of DatacageWindow's findRiver with added state for map.river
     protected String findRiver(Artifact artifact) {
         ArtifactDescription adescr = artifact.getArtifactDescription();
         DataList [] data = adescr.getOldData();
@@ -293,7 +293,8 @@
         if (data != null && data.length > 0) {
             for (int i = 0; i < data.length; i++) {
                 DataList dl = data[i];
-                if (dl.getState().equals("state.winfo.river")) {
+                if (dl.getState().equals("state.winfo.river") ||
+                        dl.getState().equals("state.map.river")) {
                     for (int j = dl.size()-1; j >= 0; --j) {
                         Data d = dl.get(j);
                         DataItem [] di = d.getItems();

http://dive4elements.wald.intevation.org