summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAutomerge <automerge@vaadin.com>2012-03-06 10:06:17 +0000
committerAutomerge <automerge@vaadin.com>2012-03-06 10:06:17 +0000
commitc5260fb30e4cc43df99ffb09791b6d98e2a1e1a2 (patch)
tree5ba4c5bd63d17c26faee62b069a276de5315cec3 /src
parent630410e7a15cc948ae13519e279678a1085081a5 (diff)
downloadvaadin-framework-c5260fb30e4cc43df99ffb09791b6d98e2a1e1a2.tar.gz
vaadin-framework-c5260fb30e4cc43df99ffb09791b6d98e2a1e1a2.zip
[merge from 6.7] Update window contents after changing the size (#3401)
svn changeset:23186/svn branch:6.8
Diffstat (limited to 'src')
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VView.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VView.java b/src/com/vaadin/terminal/gwt/client/ui/VView.java
index 46a7df9efb..f48fc7c195 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VView.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VView.java
@@ -156,6 +156,7 @@ public class VView extends SimplePanel implements Container, ResizeHandler,
private void ensureSubWindowsVisible() {
for (VWindow subWindow : subWindows) {
+ // First process width as it might affect the height
int oldLeft = subWindow.getPopupLeft();
int oldWidth = subWindow.getOffsetWidth();
int oldRight = oldLeft + oldWidth;
@@ -167,9 +168,11 @@ public class VView extends SimplePanel implements Container, ResizeHandler,
if (newLeft < 0) {
newLeft = 0;
subWindow.setWidth(width + "px");
+ subWindow.updateContentsSize();
}
}
+ // Process height once the width is final
int oldTop = subWindow.getPopupTop();
int oldHeight = subWindow.getOffsetHeight();
int oldBottom = oldTop + oldHeight;
@@ -181,6 +184,7 @@ public class VView extends SimplePanel implements Container, ResizeHandler,
if (newTop < 0) {
newTop = 0;
subWindow.setHeight(height + "px");
+ subWindow.updateContentsSize();
}
}