]> source.dussan.org Git - vaadin-framework.git/commitdiff
fixed bug which may leave new component unrendered
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 20 Sep 2007 06:36:46 +0000 (06:36 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 20 Sep 2007 06:36:46 +0000 (06:36 +0000)
svn changeset:2342/svn branch:trunk

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

index 681341c340d063cf0385b74e6d5767555e2d2d5b..f19e0829cb182e10d1fd59f8b2c97bf7e5b3f7ab 100644 (file)
@@ -110,7 +110,7 @@ public abstract class IOrderedLayout extends ComplexPanel implements Container {
                                oldChild = null;
                        } else if(hasChildComponent(child)) {
                                // current child has been moved, re-insert before current oldChild
-                               // TODO this might be optimized by movin only container element
+                               // TODO this might be optimized by moving only container element
                                // to correct position
                                removeCaption(child);
                                int index = getWidgetIndex(oldChild);
@@ -118,6 +118,10 @@ public abstract class IOrderedLayout extends ComplexPanel implements Container {
                                        index--;
                                remove(child);
                                this.insert(child, index);
+                       } else {
+                               // insert new child before old one
+                               int index = getWidgetIndex(oldChild);
+                               insert(child,index);
                        }
                        ((Paintable)child).updateFromUIDL(childUidl, client);
                }