From: Artur Signell Date: Wed, 1 Oct 2008 07:00:05 +0000 (+0000) Subject: Fix for #1939 X-Git-Tag: 6.7.0.beta1~4046 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=439a415f294209c839171825e2723790648e5f68;p=vaadin-framework.git Fix for #1939 svn changeset:5571/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 97de88939d..48bf6fa1f6 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IOrderedLayout.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IOrderedLayout.java @@ -1114,11 +1114,11 @@ public class IOrderedLayout extends Panel implements Container, } captionDimensionOrPositionUpdated = true; - } else - - // Caption exists. Move it to correct position if needed - if (after == (DOM.getChildIndex(captionWrapper, widgetElement) > DOM - .getChildIndex(captionWrapper, captionElement))) { + } else if (after == (DOM.getChildIndex(captionWrapper, + widgetElement) > DOM.getChildIndex(captionWrapper, + captionElement))) { + // Caption exists. Move it to correct position if it is not + // there Element firstElement = DOM.getChild(captionWrapper, DOM .getChildCount(captionWrapper) - 2); if (firstElement != null) { @@ -1136,6 +1136,12 @@ public class IOrderedLayout extends Panel implements Container, } captionDimensionOrPositionUpdated = true; + } else { + if (after) { + widget.addStyleName("i-orderedlayout-w-e"); + } else { + widget.removeStyleName("i-orderedlayout-w-e"); + } } } else {