diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2014-03-26 10:39:46 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2014-03-27 08:41:12 +0000 |
commit | f9796817e8557d716a31d9411919431cfbfa63e6 (patch) | |
tree | bd368bd243958fb39bb4816436cd6460d25aaed4 /client | |
parent | 55a1b204f5f9f3847443bf7ba967e09e0e63ff6b (diff) | |
download | vaadin-framework-f9796817e8557d716a31d9411919431cfbfa63e6.tar.gz vaadin-framework-f9796817e8557d716a31d9411919431cfbfa63e6.zip |
Fix VScrollTable to clear reported ranges (#13353)
Change-Id: Ieb0e2dce37ae1564151bf40d9d51cb013490b865
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ui/VScrollTable.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/client/src/com/vaadin/client/ui/VScrollTable.java b/client/src/com/vaadin/client/ui/VScrollTable.java index e800e7fe79..7c22fa2199 100644 --- a/client/src/com/vaadin/client/ui/VScrollTable.java +++ b/client/src/com/vaadin/client/ui/VScrollTable.java @@ -324,13 +324,13 @@ public class VScrollTable extends FlowPanel implements HasWidgets, ArrayList<SelectionRange> ranges = new ArrayList<SelectionRange>(2); int endOfFirstRange = row.getIndex() - 1; - if (!(endOfFirstRange - startRow.getIndex() < 0)) { + if (endOfFirstRange >= startRow.getIndex()) { // create range of first part unless its length is < 1 ranges.add(new SelectionRange(startRow, endOfFirstRange - startRow.getIndex() + 1)); } int startOfSecondRange = row.getIndex() + 1; - if (!(getEndIndex() - startOfSecondRange < 0)) { + if (getEndIndex() >= startOfSecondRange) { // create range of second part unless its length is < 1 VScrollTableRow startOfRange = scrollBody .getRowByRowIndex(startOfSecondRange); @@ -860,6 +860,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, // Send the selected row ranges client.updateVariable(paintableId, "selectedRanges", ranges.toArray(new String[selectedRowRanges.size()]), false); + selectedRowRanges.clear(); // clean selectedRowKeys so that they don't contain excess values for (Iterator<String> iterator = selectedRowKeys.iterator(); iterator |