From a07248e813f7d28873b92fdb17be30de8e2d3b1a Mon Sep 17 00:00:00 2001 From: Matti Tahvonen Date: Thu, 20 Sep 2007 06:36:46 +0000 Subject: [PATCH] fixed bug which may leave new component unrendered svn changeset:2342/svn branch:trunk --- .../toolkit/terminal/gwt/client/ui/IOrderedLayout.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); } -- 2.39.5