]> source.dussan.org Git - vaadin-framework.git/commitdiff
[merge from 6.7] Update window contents after changing the size (#3401)
authorAutomerge <automerge@vaadin.com>
Tue, 6 Mar 2012 10:06:17 +0000 (10:06 +0000)
committerAutomerge <automerge@vaadin.com>
Tue, 6 Mar 2012 10:06:17 +0000 (10:06 +0000)
svn changeset:23186/svn branch:6.8

src/com/vaadin/terminal/gwt/client/ui/VView.java

index 46a7df9efba725b4b25a21bb750368832a0698d6..f48fc7c19508283f82f57820ab5b89454da685f5 100644 (file)
@@ -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();
                 }
             }