From: Automerge Date: Mon, 2 Apr 2012 10:19:29 +0000 (+0000) Subject: [merge from 6.7] #8597 Do not leave VWindow references in the static windowOrder... X-Git-Tag: 7.0.0.alpha2~104^2~16 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1001c45a97e8091cdc20f76cd9fcc7c996b003a3;p=vaadin-framework.git [merge from 6.7] #8597 Do not leave VWindow references in the static windowOrder list svn changeset:23377/svn branch:6.8 --- diff --git a/src/com/vaadin/terminal/gwt/client/ui/VWindow.java b/src/com/vaadin/terminal/gwt/client/ui/VWindow.java index de01061641..103979927a 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VWindow.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VWindow.java @@ -580,7 +580,7 @@ public class VWindow extends VOverlay implements Container, } private void setCursorProperties() { - if (!this.draggable) { + if (!draggable) { header.getStyle().setProperty("cursor", "default"); footer.getStyle().setProperty("cursor", "default"); } else { @@ -686,6 +686,13 @@ public class VWindow extends VOverlay implements Container, @Override public void show() { + if (!windowOrder.contains(this)) { + // This is needed if the window is hidden and then shown again. + // Otherwise this VWindow is added to windowOrder in the + // constructor. + windowOrder.add(this); + } + if (vaadinModality) { showModalityCurtain(); } @@ -734,6 +741,10 @@ public class VWindow extends VOverlay implements Container, hideModalityCurtain(); } super.hide(); + + // Remove window from windowOrder to avoid references being left + // hanging. + windowOrder.remove(this); } private void setVaadinModality(boolean modality) {