summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Ahlroos <john@vaadin.com>2013-11-25 15:45:59 +0200
committerVaadin Code Review <review@vaadin.com>2013-11-27 08:36:18 +0000
commit27959ff3e6095eae3977fab384845293b2903a59 (patch)
treea3d7065d3989b9f10ed96acd341905b9c1135c18
parent11766b43d7fd5908e5cb19a051d383a9506e3c30 (diff)
downloadvaadin-framework-27959ff3e6095eae3977fab384845293b2903a59.tar.gz
vaadin-framework-27959ff3e6095eae3977fab384845293b2903a59.zip
Fixed bug where deleting column caused an exception #12830
Change-Id: Ia44b11783d9822a6b91ecd0fe7fc0547e7fd4668
-rw-r--r--client/src/com/vaadin/client/ui/grid/GridConnector.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/client/src/com/vaadin/client/ui/grid/GridConnector.java b/client/src/com/vaadin/client/ui/grid/GridConnector.java
index befbc5a50b..ac209b9c2c 100644
--- a/client/src/com/vaadin/client/ui/grid/GridConnector.java
+++ b/client/src/com/vaadin/client/ui/grid/GridConnector.java
@@ -90,11 +90,12 @@ public class GridConnector extends AbstractComponentConnector {
if (stateChangeEvent.hasPropertyChanged("columns")) {
int totalColumns = getState().columns.size();
- int currentColumns = getWidget().getColumnCount();
// Remove old columns
purgeRemovedColumns();
+ int currentColumns = getWidget().getColumnCount();
+
// Add new columns
for (int columnIndex = currentColumns; columnIndex < totalColumns; columnIndex++) {
addColumnFromStateChangeEvent(columnIndex);