aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui/CssLayout.java
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/com/vaadin/ui/CssLayout.java')
-rw-r--r--server/src/com/vaadin/ui/CssLayout.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/src/com/vaadin/ui/CssLayout.java b/server/src/com/vaadin/ui/CssLayout.java
index 7fdae32bd1..e7b63cc87a 100644
--- a/server/src/com/vaadin/ui/CssLayout.java
+++ b/server/src/com/vaadin/ui/CssLayout.java
@@ -135,7 +135,7 @@ public class CssLayout extends AbstractLayout implements LayoutClickNotifier {
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);
@@ -160,7 +160,7 @@ public class CssLayout extends AbstractLayout implements LayoutClickNotifier {
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--;