From: Matti Tahvonen Date: Thu, 20 Sep 2007 06:36:46 +0000 (+0000) Subject: fixed bug which may leave new component unrendered X-Git-Tag: 6.7.0.beta1~5978 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a07248e813f7d28873b92fdb17be30de8e2d3b1a;p=vaadin-framework.git fixed bug which may leave new component unrendered svn changeset:2342/svn branch:trunk --- diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/IOrderedLayout.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/IOrderedLayout.java index 681341c340..f19e0829cb 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IOrderedLayout.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IOrderedLayout.java @@ -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); }