diff flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapOutputTab.java @ 1403:6a7cfe9d87fe

Repaired broken WMS layer controls in map theme panel. flys-client/trunk@3288 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 18 Nov 2011 12:06:16 +0000
parents 96708d81eaf6
children 659a488243da
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapOutputTab.java	Fri Nov 18 11:39:10 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapOutputTab.java	Fri Nov 18 12:06:16 2011 +0000
@@ -405,7 +405,9 @@
                 public void onThemeMoved(Theme theme, int oldIdx, int newIdx) {
                     // this code synchronizes the ThemePanel and the OpenLayers
                     // internal order of layers.
-                    String    name = theme.getDescription();
+                    AttributedTheme at = (AttributedTheme) theme;
+
+                    String    name = at.getAttr("layers");
                     Map        map = getMap();
                     Layer[] layers = map.getLayersByName(name);
 
@@ -440,7 +442,9 @@
 
 
     protected void activateTheme(Theme theme, boolean active) {
-        String name = theme.getDescription();
+        AttributedTheme at = (AttributedTheme) theme;
+
+        String name = at.getAttr("layers");
         Layer layer = floodMap.getMap().getLayerByName(name);
 
         GWT.log("Set visibility of '" + name + "': " + active);

http://dive4elements.wald.intevation.org