]> source.dussan.org Git - vaadin-framework.git/commitdiff
Don't detach and reattach VAbstractSplitPanel child widgets unnecessarily (#11628)
authorJohannes Dahlström <johannesd@vaadin.com>
Wed, 17 Apr 2013 14:35:38 +0000 (17:35 +0300)
committerVaadin Code Review <review@vaadin.com>
Thu, 18 Apr 2013 17:51:53 +0000 (17:51 +0000)
Change-Id: I84da9b786706410b42ae4116be0b0a3da896538b

client/src/com/vaadin/client/ui/VAbstractSplitPanel.java

index 45c5cb6453311e3d50d44aa2abe26784c5fc3d3e..1cc25c741e8d45b4b97ad39f82619087b04bcf0d 100644 (file)
@@ -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();
         }