]> source.dussan.org Git - vaadin-framework.git/commitdiff
Avoid caching parent for now as the cache is never cleared
authorArtur Signell <artur@vaadin.com>
Tue, 7 Feb 2012 16:13:58 +0000 (18:13 +0200)
committerArtur Signell <artur@vaadin.com>
Tue, 7 Feb 2012 16:14:44 +0000 (18:14 +0200)
src/com/vaadin/terminal/gwt/client/ui/VAbstractPaintableWidget.java

index 6813c225d337c003ae8b80f944732c7156e1527f..efe6896e9b2f44da7e8867482df5b1f1141e4a59 100644 (file)
@@ -22,7 +22,6 @@ public abstract class VAbstractPaintableWidget implements VPaintableWidget {
     private Widget widget;
     private ApplicationConnection connection;
     private String id;
-    private VPaintableWidgetContainer parent;
 
     /* State variables */
     private boolean enabled = true;
@@ -91,10 +90,6 @@ public abstract class VAbstractPaintableWidget implements VPaintableWidget {
     }
 
     public VPaintableWidgetContainer getParent() {
-        if (parent != null) {
-            return parent;
-        }
-
         // FIXME: Hierarchy should be set by framework instead of looked up here
         VPaintableMap paintableMap = VPaintableMap.get(getConnection());
 
@@ -102,9 +97,8 @@ public abstract class VAbstractPaintableWidget implements VPaintableWidget {
         while (w != null) {
             w = w.getParent();
             if (paintableMap.isPaintable(w)) {
-                parent = (VPaintableWidgetContainer) paintableMap
+                return (VPaintableWidgetContainer) paintableMap
                         .getPaintable(w);
-                return parent;
             }
         }