]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix for #6060 - Moving a component from a GridLayout to a layout inside the GridLayou...
authorArtur Signell <artur.signell@itmill.com>
Thu, 25 Nov 2010 16:01:07 +0000 (16:01 +0000)
committerArtur Signell <artur.signell@itmill.com>
Thu, 25 Nov 2010 16:01:07 +0000 (16:01 +0000)
svn changeset:16167/svn branch:6.5

src/com/vaadin/terminal/gwt/client/ui/VGridLayout.java

index b4c3dccbc93ab95d6fb90cfb0a527cc46d05ad30..44f84b28442747109a8bef0c7dad9c1028b40116 100644 (file)
@@ -207,7 +207,12 @@ public class VGridLayout extends SimplePanel implements Paintable, Container {
             paintableToCell.remove(w);
             widgetToComponentContainer.remove(w);
             childComponentContainer.removeFromParent();
-            client.unregisterPaintable((Paintable) w);
+            if (childComponentContainer.getWidget() == w) {
+                // Only unregister if the paintable has not been moved to
+                // another layout and detached from this (hence cc.getWidget()
+                // == null, or w.getParent() != this)
+                client.unregisterPaintable((Paintable) w);
+            }
         }
         nonRenderedWidgets = null;