diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2014-08-11 15:37:07 +0300 |
---|---|---|
committer | Teemu Suo-Anttila <teemusa@vaadin.com> | 2014-08-11 15:37:07 +0300 |
commit | cf05334ac6e06bf323bafa4d02eed66d75a05ce0 (patch) | |
tree | 42189ef738103543abb229f2f0e2161280a1ed68 | |
parent | 2ae0ff76032d5160c9bc9a7549a1c05c1434d800 (diff) | |
download | vaadin-framework-cf05334ac6e06bf323bafa4d02eed66d75a05ce0.tar.gz vaadin-framework-cf05334ac6e06bf323bafa4d02eed66d75a05ce0.zip |
Fix header and footer offset when selection column is present (#13334)
Change-Id: Ic4d1661f055690ce5337cde2a1a2b989f07516e8
-rw-r--r-- | client/src/com/vaadin/client/ui/grid/GridConnector.java | 10 |
1 files 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); } |