From 3c4236d661a361392ea5827b384abcedf23d6877 Mon Sep 17 00:00:00 2001 From: Teemu Suo-Anttila Date: Tue, 25 Nov 2014 17:18:22 +0200 Subject: [PATCH] Fix removing a merged property from headers and footers (#13334) Change-Id: I1de668b73ebe0617e6100a2f8b2a84c7a94ad8a7 --- .../com/vaadin/ui/components/grid/GridStaticSection.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/src/com/vaadin/ui/components/grid/GridStaticSection.java b/server/src/com/vaadin/ui/components/grid/GridStaticSection.java index 222e620cf9..803920085b 100644 --- a/server/src/com/vaadin/ui/components/grid/GridStaticSection.java +++ b/server/src/com/vaadin/ui/components/grid/GridStaticSection.java @@ -84,7 +84,11 @@ abstract class GridStaticSection> for (Set 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> CELLTYPE cell = cells.get(propertyId); Set cellGroup = getCellGroupForCell(cell); if (cellGroup != null) { - return cellGroups.get(cellGroup); + cell = cellGroups.get(cellGroup); } return cell; } -- 2.39.5