From: Marc Englund Date: Fri, 1 Feb 2008 14:46:02 +0000 (+0000) Subject: Changed addComponent() a bit: must call super, can't call setParent() directly. X-Git-Tag: 6.7.0.beta1~5110 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7e2d7da3d18ca3cc1809949024b5bca27ad7ba68;p=vaadin-framework.git Changed addComponent() a bit: must call super, can't call setParent() directly. svn changeset:3706/svn branch:trunk --- diff --git a/src/com/itmill/toolkit/ui/GridLayout.java b/src/com/itmill/toolkit/ui/GridLayout.java index ec56136e22..ad91568390 100644 --- a/src/com/itmill/toolkit/ui/GridLayout.java +++ b/src/com/itmill/toolkit/ui/GridLayout.java @@ -193,9 +193,12 @@ public class GridLayout extends AbstractLayout { // Checks that newItem does not overlap with existing items checkExistingOverlaps(area); + // first attemt to add to super + super.addComponent(component); + // Inserts the component to right place at the list // Respect top-down, left-right ordering - component.setParent(this); + // component.setParent(this); final Iterator i = areas.iterator(); int index = 0; boolean done = false; @@ -214,7 +217,6 @@ public class GridLayout extends AbstractLayout { components.addLast(component); } - super.addComponent(component); requestRepaint(); }