From ce42589a195a43d2a3a0a79e57a54f585000ca0d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Leif=20=C3=85strand?= Date: Thu, 23 Feb 2012 12:54:15 +0200 Subject: [PATCH] Run insert to update index even if already attached (#8313) --- .../terminal/gwt/client/ui/VMeasuringOrderedLayout.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/com/vaadin/terminal/gwt/client/ui/VMeasuringOrderedLayout.java b/src/com/vaadin/terminal/gwt/client/ui/VMeasuringOrderedLayout.java index ca8b1ebc8d..3c0e9af26d 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VMeasuringOrderedLayout.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VMeasuringOrderedLayout.java @@ -39,14 +39,9 @@ public class VMeasuringOrderedLayout extends ComplexPanel { Element containerElement = getElement(); Node childAtIndex = containerElement.getChild(index); - boolean alreadyAttached; if (childAtIndex != wrapperElement) { - alreadyAttached = wrapperElement.getParentElement() == containerElement; + // Insert at correct location not attached or at wrong location containerElement.insertBefore(wrapperElement, childAtIndex); - } else { - alreadyAttached = true; - } - if (!alreadyAttached) { insert(widget, wrapperElement, index, false); } -- 2.39.5