]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix removing a merged property from headers and footers (#13334)
authorTeemu Suo-Anttila <teemusa@vaadin.com>
Tue, 25 Nov 2014 15:18:22 +0000 (17:18 +0200)
committerTeemu Suo-Anttila <teemusa@vaadin.com>
Tue, 25 Nov 2014 15:18:22 +0000 (17:18 +0200)
Change-Id: I1de668b73ebe0617e6100a2f8b2a84c7a94ad8a7

server/src/com/vaadin/ui/components/grid/GridStaticSection.java

index 222e620cf9862d943cb9ef197ee7912adf7bb40b..803920085bd183e11772d40b2a7d44a72e517d57 100644 (file)
@@ -84,7 +84,11 @@ abstract class GridStaticSection<ROWTYPE extends GridStaticSection.StaticRow<?>>
             for (Set<String> group : rowState.cellGroups.keySet()) {
                 if (group.contains(columnId)) {
                     if (group.size() > 2) {
+                        // Update map key correctly
+                        CELLTYPE mergedCell = cellGroups.remove(cellGroup);
                         cellGroup.remove(cell);
+                        cellGroups.put(cellGroup, mergedCell);
+
                         group.remove(columnId);
                     } else {
                         rowState.cellGroups.remove(group);
@@ -119,7 +123,7 @@ abstract class GridStaticSection<ROWTYPE extends GridStaticSection.StaticRow<?>>
             CELLTYPE cell = cells.get(propertyId);
             Set<CELLTYPE> cellGroup = getCellGroupForCell(cell);
             if (cellGroup != null) {
-                return cellGroups.get(cellGroup);
+                cell = cellGroups.get(cellGroup);
             }
             return cell;
         }