]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix bug for spacing on first widget (#12420)
authorHenri Sara <hesara@vaadin.com>
Thu, 22 Aug 2013 12:26:35 +0000 (15:26 +0300)
committerHenri Sara <hesara@vaadin.com>
Thu, 22 Aug 2013 12:26:35 +0000 (15:26 +0300)
Change-Id: I58db924446d5c4908f10b29f910cf2aa90ef7a2a

client/src/com/vaadin/client/ui/orderedlayout/VAbstractOrderedLayout.java

index a2c03eaed1affd7d0622cf0a84e23456bf476254..54c9eb6c680865000922a3a48906a41701668453 100644 (file)
@@ -366,9 +366,9 @@ public class VAbstractOrderedLayout extends FlowPanel {
         this.spacing = spacing;
         // first widget does not have spacing on
         // optimization to avoid looking up widget indices on every iteration
-        Slot firstSlot = null;
+        Widget firstSlot = null;
         if (getWidgetCount() > 0) {
-            firstSlot = widgetToSlot.get(getWidget(0));
+            firstSlot = getWidget(0);
         }
         for (Slot slot : widgetToSlot.values()) {
             slot.setSpacing(spacing && firstSlot != slot);