From c5260fb30e4cc43df99ffb09791b6d98e2a1e1a2 Mon Sep 17 00:00:00 2001 From: Automerge Date: Tue, 6 Mar 2012 10:06:17 +0000 Subject: [PATCH] [merge from 6.7] Update window contents after changing the size (#3401) svn changeset:23186/svn branch:6.8 --- src/com/vaadin/terminal/gwt/client/ui/VView.java | 4 ++++ 1 file changed, 4 insertions(+) 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(); } } -- 2.39.5