[Dive4elements-commits] [PATCH 2 of 2] Remove InfoPanel stack only if it exists

Wald Commits scm-commit at wald.intevation.org
Mon Oct 29 10:39:38 CET 2012


# HG changeset patch
# User Björn Ricks <bjoern.ricks at intevation.de>
# Date 1351503573 -3600
# Node ID 250c4a0fa69647a15ea27750e50cd1007db10358
# Parent  6589f1c9510170076c9e4fa83f166da9a84a99f7
Remove InfoPanel stack only if it exists

Avoid raised exception if an other artifact than WINFO or MINFO is selected.

diff -r 6589f1c95101 -r 250c4a0fa696 flys-client/src/main/java/de/intevation/flys/client/client/ui/ParameterList.java
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/ParameterList.java	Mon Oct 29 10:27:09 2012 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/ParameterList.java	Mon Oct 29 10:39:33 2012 +0100
@@ -981,7 +981,10 @@
 
     private void removeInfoPanel() {
         GWT.log("ParameterList - removeInfoPanel");
-        stack.removeSection(InfoPanel.SECTION_ID);
+        SectionStackSection exists = stack.getSection(InfoPanel.SECTION_ID);
+        if (exists != null) {
+            stack.removeSection(InfoPanel.SECTION_ID);
+        }
     }
 
 


More information about the Dive4elements-commits mailing list