From: Jouni Koivuviita Date: Thu, 19 Apr 2012 11:23:47 +0000 (+0300) Subject: Fixed dissappearing spacing element when child widget was detached and then reattache... X-Git-Tag: 7.0.0.beta1~256 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2df307ca3608ce8fa7ec87c64a75adf6ea3cbe7e;p=vaadin-framework.git Fixed dissappearing spacing element when child widget was detached and then reattached to a different place --- diff --git a/src/com/vaadin/terminal/gwt/client/ui/VBoxLayout.java b/src/com/vaadin/terminal/gwt/client/ui/VBoxLayout.java index eae9dd0355..bb220877bd 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VBoxLayout.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VBoxLayout.java @@ -407,6 +407,15 @@ public class VBoxLayout extends FlowPanel { super.onDetach(); } + @Override + protected void onAttach() { + super.onAttach(); + if (spacer != null) { + getElement().getParentElement().insertBefore(spacer, + getElement()); + } + } + } protected class Icon extends UIObject {