# HG changeset patch # User Ingo Weinzierl # Date 1321617976 0 # Node ID 6a7cfe9d87fe701c3f805a71ab52502bbadd982b # Parent 15ef3d3081b724af57f2539612a9707791a05fd0 Repaired broken WMS layer controls in map theme panel. flys-client/trunk@3288 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 15ef3d3081b7 -r 6a7cfe9d87fe flys-client/ChangeLog --- a/flys-client/ChangeLog Fri Nov 18 11:39:10 2011 +0000 +++ b/flys-client/ChangeLog Fri Nov 18 12:06:16 2011 +0000 @@ -1,3 +1,10 @@ +2011-11-18 Ingo Weinzierl + + * src/main/java/de/intevation/flys/client/client/ui/map/MapThemePanel.java, + src/main/java/de/intevation/flys/client/client/ui/map/MapOutputTab.java: + Use the correct names of created WMS layers - which is no longer + Theme.getDescription() but AttributedTheme.getAttr("layers"). + 2011-11-18 Ingo Weinzierl * src/main/java/de/intevation/flys/client/shared/model/FeatureInfo.java: diff -r 15ef3d3081b7 -r 6a7cfe9d87fe flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapOutputTab.java --- 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); diff -r 15ef3d3081b7 -r 6a7cfe9d87fe flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapThemePanel.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapThemePanel.java Fri Nov 18 11:39:10 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapThemePanel.java Fri Nov 18 12:06:16 2011 +0000 @@ -243,7 +243,8 @@ theme.setVisible(0); theme.setActive(0); - getMapOutputTab().removeLayer(theme.getDescription()); + AttributedTheme at = (AttributedTheme) theme; + getMapOutputTab().removeLayer(at.getAttr("layers")); } updateCollection();