From: Automerge Date: Tue, 22 May 2012 17:07:43 +0000 (+0000) Subject: [merge from 6.7] Recalculate column widths if scrollbar has changed (#6039) X-Git-Tag: 7.0.0.alpha3~140^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e8844544fcf3f62e9b8a9226e235b90a7106d881;p=vaadin-framework.git [merge from 6.7] Recalculate column widths if scrollbar has changed (#6039) svn changeset:23804/svn branch:6.8 --- diff --git a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java index 38c0ccce11..39492d8731 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java @@ -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(); }