From 6704241d8a2e9e4127aea0c5c78571d56651ecc9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Leif=20=C3=85strand?= Date: Thu, 15 Mar 2012 13:53:37 +0200 Subject: [PATCH] Ensure layout -> caption dependencies are unregistered when a slot is removed --- .../terminal/gwt/client/ui/VMeasuringOrderedLayout.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/vaadin/terminal/gwt/client/ui/VMeasuringOrderedLayout.java b/src/com/vaadin/terminal/gwt/client/ui/VMeasuringOrderedLayout.java index ce317ee563..cb353825b6 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VMeasuringOrderedLayout.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VMeasuringOrderedLayout.java @@ -77,7 +77,9 @@ public class VMeasuringOrderedLayout extends ComplexPanel { public void removeSlot(VLayoutSlot slot) { VCaption caption = slot.getCaption(); if (caption != null) { - remove(caption); + // Must remove using setCaption to ensure dependencies (layout -> + // caption) are unregistered + slot.setCaption(null); } remove(slot.getWidget()); -- 2.39.5