aboutsummaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2014-03-26 10:39:46 +0200
committerVaadin Code Review <review@vaadin.com>2014-03-27 08:41:12 +0000
commitf9796817e8557d716a31d9411919431cfbfa63e6 (patch)
treebd368bd243958fb39bb4816436cd6460d25aaed4 /client
parent55a1b204f5f9f3847443bf7ba967e09e0e63ff6b (diff)
downloadvaadin-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.java5
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