# HG changeset patch # User Ingo Weinzierl # Date 1309334386 0 # Node ID 3b02a798d75da55fc792902eb5110066c49e7900 # Parent b82bed27429feae5547f973e0a4ddd44b8f02a5f #181 Repaired activate/deactivate function in theme list. flys-client/trunk@2265 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r b82bed27429f -r 3b02a798d75d flys-client/ChangeLog --- a/flys-client/ChangeLog Tue Jun 28 15:55:56 2011 +0000 +++ b/flys-client/ChangeLog Wed Jun 29 07:59:46 2011 +0000 @@ -1,3 +1,12 @@ +2011-06-29 Ingo Weinzierl + + flys/issue181 (Erstes Thema in der Themenliste wählt sich automatisch wieder an) + + * src/main/java/de/intevation/flys/client/client/ui/chart/ChartThemePanel.java: + We will no longer check if an update of the theme list is necessary. + The EditEvent that is caught should be enough information to start the + update process. + 2011-06-28 Ingo Weinzierl * pom.xml: GWT version upgrade from 2.1.1 to 2.3.0. diff -r b82bed27429f -r 3b02a798d75d flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartThemePanel.java --- 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(); }