[Dive4elements-commits] [PATCH] Search the river name also in the map.river state

Wald Commits scm-commit at wald.intevation.org
Fri Jun 21 10:20:32 CEST 2013


# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1371802828 -7200
# Node ID 9d5f09698d818e209c567193bc0f515cc3fdff5d
# Parent  2ad7f3ada1dc029c38f52a379bb178f08ebfdc3c
Search the river name also in the map.river state

diff -r 2ad7f3ada1dc -r 9d5f09698d81 gwt-client/src/main/java/org/dive4elements/river/client/client/ui/map/MapPrintPanel.java
--- 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();


More information about the Dive4elements-commits mailing list