summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2010-11-25 16:01:07 +0000
committerArtur Signell <artur.signell@itmill.com>2010-11-25 16:01:07 +0000
commitcd198fb9a8faa0d7217c876d230d5b45a93658f7 (patch)
treea8aa2a48ad58ad470d661e8077a11e0595412ac4 /src/com
parent7d7c65dbc89bdfd018af203900cedf56b5db52ec (diff)
downloadvaadin-framework-cd198fb9a8faa0d7217c876d230d5b45a93658f7.tar.gz
vaadin-framework-cd198fb9a8faa0d7217c876d230d5b45a93658f7.zip
Fix for #6060 - Moving a component from a GridLayout to a layout inside the GridLayout causes the client side widget to be lost
svn changeset:16167/svn branch:6.5
Diffstat (limited to 'src/com')
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VGridLayout.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VGridLayout.java b/src/com/vaadin/terminal/gwt/client/ui/VGridLayout.java
index b4c3dccbc9..44f84b2844 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VGridLayout.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VGridLayout.java
@@ -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;