From: Jonatan Kronqvist Date: Mon, 5 Jul 2010 06:37:52 +0000 (+0000) Subject: Cleaned up the code (#4317) X-Git-Tag: 6.7.0.beta1~1439 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=565fe51243d05cf9fb1fa20650a061e735d4c24a;p=vaadin-framework.git Cleaned up the code (#4317) svn changeset:14054/svn branch:6.4 --- diff --git a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java index a5a32757fa..e2753dfc27 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java @@ -1375,9 +1375,7 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler, scrollBody.reLayoutComponents(); } - if (enabled && isVisible()) { - updatePageLength(); - } + updatePageLength(); /* * Fix "natural" height if height is not set. This must be after width @@ -4233,6 +4231,11 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler, * Determines the pagelength when the table height is fixed. */ public void updatePageLength() { + // Only update if visible and enabled + if (!isVisible() || !enabled) { + return; + } + if (scrollBody == null) { return; } @@ -4469,7 +4472,7 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler, this.height = height; super.setHeight(height); setContainerHeight(); - if (initializedAndAttached && isVisible() && enabled) { + if (initializedAndAttached) { updatePageLength(); } if (!rendering) {