diff options
author | Dmitrij Abolichin <dirolwhite@gmail.com> | 2015-10-03 00:38:31 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-10-07 06:19:35 +0000 |
commit | 6a0919f6680eabb8dae0878854f45c2c67932b39 (patch) | |
tree | e850311f5c58f77c2f2ea2f63d087d02dfca28b2 /server/src/com/vaadin/ui/AbsoluteLayout.java | |
parent | ce8d9e68e06c924d7d780c22ea689a38d779725b (diff) | |
download | vaadin-framework-6a0919f6680eabb8dae0878854f45c2c67932b39.tar.gz vaadin-framework-6a0919f6680eabb8dae0878854f45c2c67932b39.zip |
Fix adding to same parent, component shouldn't be removed (#16568)
Change-Id: I406058abbc4a28651b9103e7f0d7fbcbf0fa8984
Diffstat (limited to 'server/src/com/vaadin/ui/AbsoluteLayout.java')
-rw-r--r-- | server/src/com/vaadin/ui/AbsoluteLayout.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/server/src/com/vaadin/ui/AbsoluteLayout.java b/server/src/com/vaadin/ui/AbsoluteLayout.java index 303e8efd6b..c62da24612 100644 --- a/server/src/com/vaadin/ui/AbsoluteLayout.java +++ b/server/src/com/vaadin/ui/AbsoluteLayout.java @@ -154,6 +154,9 @@ public class AbsoluteLayout extends AbstractLayout implements */ private void addComponent(Component c, ComponentPosition position) throws IllegalArgumentException { + if (equals(c.getParent())) { + removeComponent(c); + } /* * Create position instance and add it to componentToCoordinates map. We * need to do this before we call addComponent so the attachListeners |