summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAutomerge <automerge@vaadin.com>2012-04-02 10:19:29 +0000
committerAutomerge <automerge@vaadin.com>2012-04-02 10:19:29 +0000
commit1001c45a97e8091cdc20f76cd9fcc7c996b003a3 (patch)
treed51865e87b628d9fe34cc321c0c6d8d0845bd9fa
parenta6e0d4d7ea1e47a2ced9cb2278e2944e8bbcbe16 (diff)
downloadvaadin-framework-1001c45a97e8091cdc20f76cd9fcc7c996b003a3.tar.gz
vaadin-framework-1001c45a97e8091cdc20f76cd9fcc7c996b003a3.zip
[merge from 6.7] #8597 Do not leave VWindow references in the static windowOrder list
svn changeset:23377/svn branch:6.8
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VWindow.java13
1 files changed, 12 insertions, 1 deletions
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) {