]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix for #6061 - Moving a component from a AbsoluteLayout to a layout inside the Absol...
authorArtur Signell <artur.signell@itmill.com>
Thu, 25 Nov 2010 15:53:50 +0000 (15:53 +0000)
committerArtur Signell <artur.signell@itmill.com>
Thu, 25 Nov 2010 15:53:50 +0000 (15:53 +0000)
svn changeset:16166/svn branch:6.5

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

index 50e33c4c19ee3fb48209d83ec8b511c6c65a39ea..4d8c6fe86fab51cbfc094c2f04068febe4278000 100644 (file)
@@ -297,7 +297,14 @@ public class VAbsoluteLayout extends ComplexPanel implements Container {
             if (caption != null) {
                 caption.removeFromParent();
             }
-            client.unregisterPaintable(paintable);
+
+            // Only unregister if the paintable has not been moved to another
+            // layout and detached from this (hence parent != this or
+            // getWidget() != paintable)
+            if (getWidget() == paintable) {
+                client.unregisterPaintable(paintable);
+            }
+
             removeFromParent();
         }