]> source.dussan.org Git - vaadin-framework.git/commitdiff
Cleaned up the code (#4317)
authorJonatan Kronqvist <jonatan.kronqvist@itmill.com>
Mon, 5 Jul 2010 06:37:52 +0000 (06:37 +0000)
committerJonatan Kronqvist <jonatan.kronqvist@itmill.com>
Mon, 5 Jul 2010 06:37:52 +0000 (06:37 +0000)
svn changeset:14054/svn branch:6.4

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

index a5a32757fa70bd065d57b36b1ba6a5defba812ba..e2753dfc2760db1e205f20b20887994c38685747 100644 (file)
@@ -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) {