]> source.dussan.org Git - vaadin-framework.git/commitdiff
Recalculate column widths after changing table height (#6039)
authorLeif Åstrand <leif@vaadin.com>
Mon, 11 Jun 2012 07:49:11 +0000 (07:49 +0000)
committerLeif Åstrand <leif@vaadin.com>
Mon, 11 Jun 2012 07:49:11 +0000 (07:49 +0000)
Also fixes a rounding problem causing column width calculation to show scrollbars in IE9 under certain conditions.

svn changeset:23928/svn branch:6.8

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

index d88d0d31e5cc77f6cdeef559ce35e3db76834bd3..24097c0949a818433568faa1b618d1971465d1ed 100644 (file)
@@ -6120,7 +6120,7 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
                     && totalRows == pageLength) {
                 // fix body height (may vary if lazy loading is offhorizontal
                 // scrollbar appears/disappears)
-                int bodyHeight = scrollBody.getRequiredHeight();
+                int bodyHeight = Util.getRequiredHeight(scrollBody);
                 boolean needsSpaceForHorizontalScrollbar = (availW < usedMinimumWidth);
                 if (needsSpaceForHorizontalScrollbar) {
                     bodyHeight += Util.getNativeScrollbarSize();
@@ -6232,6 +6232,9 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
 
     @Override
     public void setHeight(String height) {
+        if (height.equals(this.height)) {
+            return;
+        }
         this.height = height;
         super.setHeight(height);
         setContainerHeight();
@@ -6253,6 +6256,8 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
             });
         }
 
+        triggerLazyColumnAdjustment(false);
+
         /*
          * setting height may affect wheter the component has scrollbars ->
          * needs scrolling or not