Mercurial > dive4elements > river
changeset 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 | 15ef3d3081b7 |
children | 09566522e899 |
files | flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapOutputTab.java flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapThemePanel.java |
diffstat | 3 files changed, 15 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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 <ingo@intevation.de> + + * 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 <ingo@intevation.de> * src/main/java/de/intevation/flys/client/shared/model/FeatureInfo.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);
--- 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();