From 44d3e1c1a89c8c46ace408c457976b636ece2a19 Mon Sep 17 00:00:00 2001 From: Teemu Suo-Anttila Date: Tue, 8 Sep 2015 17:36:57 +0300 Subject: Fix Editor selection checkbox handling to be more specific (#18818) Change-Id: Ic33572d3cd9e6117dc133bbfe26bc707c4b84f21 --- client/src/com/vaadin/client/widgets/Grid.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/com/vaadin/client/widgets/Grid.java b/client/src/com/vaadin/client/widgets/Grid.java index 8d7e6f892c..4e91342091 100644 --- a/client/src/com/vaadin/client/widgets/Grid.java +++ b/client/src/com/vaadin/client/widgets/Grid.java @@ -141,6 +141,7 @@ import com.vaadin.client.widget.grid.events.ScrollHandler; import com.vaadin.client.widget.grid.events.SelectAllEvent; import com.vaadin.client.widget.grid.events.SelectAllHandler; import com.vaadin.client.widget.grid.selection.HasSelectionHandlers; +import com.vaadin.client.widget.grid.selection.MultiSelectionRenderer; import com.vaadin.client.widget.grid.selection.SelectionEvent; import com.vaadin.client.widget.grid.selection.SelectionHandler; import com.vaadin.client.widget.grid.selection.SelectionModel; @@ -1361,7 +1362,9 @@ public class Grid extends ResizeComposite implements } private void updateSelectionCheckboxesAsNeeded(boolean isEnabled) { - if (grid.getSelectionModel() instanceof Multi) { + // FIXME: This is too much guessing. Define a better way to do this. + if (grid.selectionColumn != null + && grid.selectionColumn.getRenderer() instanceof MultiSelectionRenderer) { grid.refreshBody(); CheckBox checkBox = (CheckBox) grid.getDefaultHeaderRow() .getCell(grid.selectionColumn).getWidget(); -- cgit v1.2.3