]> source.dussan.org Git - vaadin-framework.git/commitdiff
IExpandLayout: fixed removing widgets
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Wed, 21 Nov 2007 11:44:16 +0000 (11:44 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Wed, 21 Nov 2007 11:44:16 +0000 (11:44 +0000)
svn changeset:2876/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ui/IExpandLayout.java

index fc86aec057b865ef5088374c9600375779323b67..f4e71cfc922f9972f9509a2739b3f6e7b3b01454 100644 (file)
@@ -464,13 +464,11 @@ public class IExpandLayout extends ComplexPanel implements
     }
 
     public boolean remove(Widget w) {
-        Element wrapper = DOM.getParent(w.getElement());
+        WidgetWrapper ww = getWidgetWrapperFor(w);
         boolean removed = super.remove(w);
         if (removed) {
             if (!(w instanceof Caption)) {
-                DOM.removeChild(childContainer,
-                        orientationMode == ORIENTATION_HORIZONTAL ? wrapper
-                                : DOM.getParent(wrapper));
+                DOM.removeChild(childContainer, ww.getElement());
             }
             return true;
         }