From: Johannes Dahlström Date: Wed, 17 Apr 2013 14:35:38 +0000 (+0300) Subject: Don't detach and reattach VAbstractSplitPanel child widgets unnecessarily (#11628) X-Git-Tag: 7.0.5~6 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4f9df1f6f0926cfce846a43c557e9b69302a4ca3;p=vaadin-framework.git Don't detach and reattach VAbstractSplitPanel child widgets unnecessarily (#11628) Change-Id: I84da9b786706410b42ae4116be0b0a3da896538b --- diff --git a/client/src/com/vaadin/client/ui/VAbstractSplitPanel.java b/client/src/com/vaadin/client/ui/VAbstractSplitPanel.java index 45c5cb6453..1cc25c741e 100644 --- a/client/src/com/vaadin/client/ui/VAbstractSplitPanel.java +++ b/client/src/com/vaadin/client/ui/VAbstractSplitPanel.java @@ -499,6 +499,9 @@ public class VAbstractSplitPanel extends ComplexPanel { /** For internal use only. May be removed or replaced in the future. */ public void setFirstWidget(Widget w) { + if (firstChild == w) { + return; + } if (firstChild != null) { firstChild.removeFromParent(); } @@ -510,6 +513,9 @@ public class VAbstractSplitPanel extends ComplexPanel { /** For internal use only. May be removed or replaced in the future. */ public void setSecondWidget(Widget w) { + if (secondChild == w) { + return; + } if (secondChild != null) { secondChild.removeFromParent(); }