From e8844544fcf3f62e9b8a9226e235b90a7106d881 Mon Sep 17 00:00:00 2001 From: Automerge Date: Tue, 22 May 2012 17:07:43 +0000 Subject: [PATCH] [merge from 6.7] Recalculate column widths if scrollbar has changed (#6039) svn changeset:23804/svn branch:6.8 --- src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java | 8 ++++++++ 1 file changed, 8 insertions(+) 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(); } -- 2.39.5