diff options
Diffstat (limited to 'server/src/com/vaadin/ui/AbstractOrderedLayout.java')
-rw-r--r-- | server/src/com/vaadin/ui/AbstractOrderedLayout.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/src/com/vaadin/ui/AbstractOrderedLayout.java b/server/src/com/vaadin/ui/AbstractOrderedLayout.java index 27880db75f..638f6bc3f9 100644 --- a/server/src/com/vaadin/ui/AbstractOrderedLayout.java +++ b/server/src/com/vaadin/ui/AbstractOrderedLayout.java @@ -105,7 +105,7 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements public void addComponentAsFirst(Component c) { // If c is already in this, we must remove it before proceeding // see ticket #7668 - if (c.getParent() == this) { + if (equals(c.getParent())) { removeComponent(c); } components.addFirst(c); @@ -131,7 +131,7 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements public void addComponent(Component c, int index) { // If c is already in this, we must remove it before proceeding // see ticket #7668 - if (c.getParent() == this) { + if (equals(c.getParent())) { // When c is removed, all components after it are shifted down if (index > getComponentIndex(c)) { index--; |