]> source.dussan.org Git - vaadin-framework.git/commitdiff
[merge from 6.7] Recalculate column widths if scrollbar has changed (#6039)
authorAutomerge <automerge@vaadin.com>
Tue, 22 May 2012 17:07:43 +0000 (17:07 +0000)
committerAutomerge <automerge@vaadin.com>
Tue, 22 May 2012 17:07:43 +0000 (17:07 +0000)
svn changeset:23804/svn branch:6.8

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

index 38c0ccce111c6a1640c6dc10c8023b62032a5bf6..39492d873125cfcc4a69b53078ef24187abe654c 100644 (file)
@@ -2112,6 +2112,9 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
                 return true;
             }
         } else {
+            if (scrollBody == null) {
+                return false;
+            }
             int fakeheight = (int) Math.round(scrollBody.getRowHeight()
                     * totalRows);
             int availableHeight = scrollBodyPanel.getElement().getPropertyInt(
@@ -6213,10 +6216,15 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
 
     @Override
     public void setHeight(String height) {
+        boolean hadScrollbars = willHaveScrollbars();
         this.height = height;
         super.setHeight(height);
         setContainerHeight();
 
+        if (hadScrollbars != willHaveScrollbars()) {
+            triggerLazyColumnAdjustment(true);
+        }
+
         if (initializedAndAttached) {
             updatePageLength();
         }