From: Henri Sara Date: Thu, 22 Aug 2013 12:26:35 +0000 (+0300) Subject: Fix bug for spacing on first widget (#12420) X-Git-Tag: 7.1.4~23 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=39fd5fc7c54987145ca4d9a1b9ffb3ebffb8f45c;p=vaadin-framework.git Fix bug for spacing on first widget (#12420) Change-Id: I58db924446d5c4908f10b29f910cf2aa90ef7a2a --- diff --git a/client/src/com/vaadin/client/ui/orderedlayout/VAbstractOrderedLayout.java b/client/src/com/vaadin/client/ui/orderedlayout/VAbstractOrderedLayout.java index a2c03eaed1..54c9eb6c68 100644 --- a/client/src/com/vaadin/client/ui/orderedlayout/VAbstractOrderedLayout.java +++ b/client/src/com/vaadin/client/ui/orderedlayout/VAbstractOrderedLayout.java @@ -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);