# HG changeset patch # User Ingo Weinzierl # Date 1330615113 0 # Node ID 46fc11ad697f974f054f88d953a2b5aa3292070b # Parent e0f4ea518d59260cdedd6a86a9c32a64eb2120cd #555 Close existing GetFeatureInfoWindows before creating new ones. flys-client/trunk@4107 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r e0f4ea518d59 -r 46fc11ad697f flys-client/ChangeLog --- a/flys-client/ChangeLog Thu Mar 01 15:07:04 2012 +0000 +++ b/flys-client/ChangeLog Thu Mar 01 15:18:33 2012 +0000 @@ -1,3 +1,10 @@ +2012-03-01 Ingo Weinzierl + + flys/issue555 (ÜSK: Info-Button) + + * src/main/java/de/intevation/flys/client/client/ui/map/GetFeatureInfo.java: + Close old GetFeatureInfoWindows before creating new ones. + 2012-03-01 Ingo Weinzierl * src/main/java/de/intevation/flys/client/shared/model/ThemeList.java: New diff -r e0f4ea518d59 -r 46fc11ad697f flys-client/src/main/java/de/intevation/flys/client/client/ui/map/GetFeatureInfo.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/GetFeatureInfo.java Thu Mar 01 15:07:04 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/GetFeatureInfo.java Thu Mar 01 15:18:33 2012 +0000 @@ -26,6 +26,8 @@ protected FLYSConstants MSG = GWT.create(FLYSConstants.class); + protected GetFeatureInfoWindow gfiWindow; + protected Map map; protected ThemePanel themePanel; protected String infoFormat; @@ -54,6 +56,16 @@ } + protected void newGetFeatureInfoWindow(List features) { + if (gfiWindow != null) { + gfiWindow.destroy(); + } + + gfiWindow = new GetFeatureInfoWindow(features); + gfiWindow.show(); + } + + @Override public void onClick(MapClickListener.MapClickEvent e) { LonLat lonlat = e.getLonLat(); @@ -73,7 +85,7 @@ } public void onSuccess(List features) { - new GetFeatureInfoWindow(features).show(); + newGetFeatureInfoWindow(features); } }); }