]> source.dussan.org Git - vaadin-framework.git/commitdiff
fixes #1715, avoids double attach for component inside panel
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Fri, 23 May 2008 07:22:37 +0000 (07:22 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Fri, 23 May 2008 07:22:37 +0000 (07:22 +0000)
svn changeset:4620/svn branch:trunk

src/com/itmill/toolkit/ui/Panel.java

index 20840404273d3b9eb3a1d315f9af0e49c5abfa8d..0d26a7a998ba237262a6dd10cd2df01131a0293b 100644 (file)
@@ -397,7 +397,8 @@ public class Panel extends AbstractComponentContainer implements Scrollable,
      * @see com.itmill.toolkit.ui.Component#attach()
      */
     public void attach() {
-        super.attach();
+        // can't call parent here as this is Panels hierarchy is a hack
+        requestRepaint();
         if (layout != null) {
             layout.attach();
         }
@@ -409,6 +410,7 @@ public class Panel extends AbstractComponentContainer implements Scrollable,
      * @see com.itmill.toolkit.ui.Component#detach()
      */
     public void detach() {
+        // can't call parent here as this is Panels hierarchy is a hack
         if (layout != null) {
             layout.detach();
         }