]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix for #1939
authorArtur Signell <artur.signell@itmill.com>
Wed, 1 Oct 2008 07:00:05 +0000 (07:00 +0000)
committerArtur Signell <artur.signell@itmill.com>
Wed, 1 Oct 2008 07:00:05 +0000 (07:00 +0000)
svn changeset:5571/svn branch:trunk

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

index 97de88939de5d627a3f4a7ec82bda29f5539478e..48bf6fa1f620c4a80b0881db5ea791b34a10e6b6 100644 (file)
@@ -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 {