diff flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartThemePanel.java @ 777:3b02a798d75d

#181 Repaired activate/deactivate function in theme list. flys-client/trunk@2265 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 29 Jun 2011 07:59:46 +0000
parents c17c593f8732
children 374712890b94
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartThemePanel.java	Tue Jun 28 15:55:56 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartThemePanel.java	Wed Jun 29 07:59:46 2011 +0000
@@ -238,45 +238,7 @@
         Theme theme = rec.getTheme();
         theme.setActive(rec.getActive());
 
-        updateThemeList(rec.getTheme());
-    }
-
-
-    /**
-     * Update the theme list of the current collection with a modified theme. If
-     * a theme is really modified, the CollectionAttributeService is triggered
-     * to save the changes to the artifact server.
-     *
-     * @param theme The modified theme.
-     */
-    protected void updateThemeList(Theme theme) {
-        GWT.log("Update theme: " + theme.getFacet());
-
-        ThemeList themeList = getThemeList();
-
-        String a = theme.getArtifact();
-        String f = theme.getFacet();
-
-        int num = themeList != null ? themeList.getThemeCount() : 0;
-
-        boolean updateRequired = false;
-
-        for (int i = 1; i <= num; i++) {
-            Theme old = themeList.getThemeAt(i);
-
-            if (f.equals(old.getFacet()) && a.equals(old.getArtifact())) {
-                themeList.removeTheme(old);
-                themeList.addTheme(theme);
-
-                updateRequired = true;
-
-                break;
-            }
-        }
-
-        if (updateRequired) {
-            updateCollection();
-        }
+        updateCollection();
     }
 
 

http://dive4elements.wald.intevation.org