From 203cb91e08cd05ac9e088dea4f282e082f8e5b69 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Leif=20=C3=85strand?= Date: Thu, 8 Dec 2011 12:25:17 +0000 Subject: [PATCH] Update selection ranges when unselecting rows from the server (#8076) svn changeset:22316/svn branch:6.7 --- src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java | 6 +++++- ...selectInRange.html2 => ProgrammaticUnselectInRange.html} | 0 2 files changed, 5 insertions(+), 1 deletion(-) rename tests/testbench/com/vaadin/tests/components/table/{ProgrammaticUnselectInRange.html2 => ProgrammaticUnselectInRange.html} (100%) diff --git a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java index 6ba145c8b8..38872c73a1 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java @@ -56,7 +56,6 @@ import com.google.gwt.user.client.ui.Panel; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.UIObject; import com.google.gwt.user.client.ui.Widget; - import com.vaadin.terminal.gwt.client.ApplicationConnection; import com.vaadin.terminal.gwt.client.BrowserInfo; import com.vaadin.terminal.gwt.client.Container; @@ -1095,6 +1094,11 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler, } if (selected != row.isSelected()) { row.toggleSelection(); + if (!isSingleSelectMode() && !selected) { + // Update selection range in case a row is + // unselected from the middle of a range - #8076 + removeRowFromUnsentSelectionRanges(row); + } } } } diff --git a/tests/testbench/com/vaadin/tests/components/table/ProgrammaticUnselectInRange.html2 b/tests/testbench/com/vaadin/tests/components/table/ProgrammaticUnselectInRange.html similarity index 100% rename from tests/testbench/com/vaadin/tests/components/table/ProgrammaticUnselectInRange.html2 rename to tests/testbench/com/vaadin/tests/components/table/ProgrammaticUnselectInRange.html -- 2.39.5