From cf05334ac6e06bf323bafa4d02eed66d75a05ce0 Mon Sep 17 00:00:00 2001 From: Teemu Suo-Anttila Date: Mon, 11 Aug 2014 15:37:07 +0300 Subject: Fix header and footer offset when selection column is present (#13334) Change-Id: Ic4d1661f055690ce5337cde2a1a2b989f07516e8 --- client/src/com/vaadin/client/ui/grid/GridConnector.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/client/src/com/vaadin/client/ui/grid/GridConnector.java b/client/src/com/vaadin/client/ui/grid/GridConnector.java index 12952c7db8..17a9d22d77 100644 --- a/client/src/com/vaadin/client/ui/grid/GridConnector.java +++ b/client/src/com/vaadin/client/ui/grid/GridConnector.java @@ -290,14 +290,14 @@ public class GridConnector extends AbstractHasComponentsConnector { for (RowState rowState : state.rows) { StaticRow row = section.appendRow(); - int diff = 1; + int selectionOffset = 1; if (getWidget().getSelectionModel() instanceof SelectionModel.None) { - diff = 0; + selectionOffset = 0; } - assert rowState.cells.size() == getWidget().getColumnCount() - diff; + assert rowState.cells.size() == getWidget().getColumnCount() - selectionOffset; - int i = 0; + int i = 0 + selectionOffset; for (CellState cellState : rowState.cells) { StaticCell cell = row.getCell(i++); switch (cellState.type) { @@ -321,7 +321,7 @@ public class GridConnector extends AbstractHasComponentsConnector { GridColumn[] columns = new GridColumn[group.size()]; i = 0; for (Integer colIndex : group) { - columns[i++] = getWidget().getColumn(diff + colIndex); + columns[i++] = getWidget().getColumn(selectionOffset + colIndex); } row.join(columns); } -- cgit v1.2.3