]> source.dussan.org Git - vaadin-framework.git/commitdiff
#7839 Avoid discarding rows when updating rows as row indexes have not been updated...
authorArtur Signell <artur.signell@itmill.com>
Fri, 4 Nov 2011 08:13:49 +0000 (08:13 +0000)
committerArtur Signell <artur.signell@itmill.com>
Fri, 4 Nov 2011 08:13:49 +0000 (08:13 +0000)
svn changeset:21894/svn branch:6.7

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

index 1588936c3c1aad2ca205b2dc5f266f0a52c194d1..959b92cffaea137c832d83973cc00c4b015bf15d 100644 (file)
@@ -1431,8 +1431,6 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
         int count = partialRowUpdates.getIntAttribute("numurows");
         scrollBody.unlinkRows(firstRowIx, count);
         scrollBody.insertRows(partialRowUpdates, firstRowIx, count);
-
-        discardRowsOutsideCacheWindow();
     }
 
     /**
@@ -1460,14 +1458,18 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
                         + scrollBody.getLastRendered() + " rendered!");
             }
         }
-        discardCacheRows(firstRowToKeep, lastRowToKeep);
+        discardRowsOutsideOf(firstRowToKeep, lastRowToKeep);
 
         scrollBody.fixSpacers();
 
         scrollBody.restoreRowVisibility();
     }
 
-    private void discardCacheRows(int optimalFirstRow, int optimalLastRow) {
+    private void discardRowsOutsideOf(int optimalFirstRow, int optimalLastRow) {
+        /*
+         * firstDiscarded and lastDiscarded are only calculated for debug
+         * purposes
+         */
         int firstDiscarded = -1, lastDiscarded = -1;
         boolean cont = true;
         while (cont && scrollBody.getLastRendered() > optimalFirstRow