]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix for #4354 - SplitPanel setComponent methods should check if the component is...
authorArtur Signell <artur.signell@itmill.com>
Tue, 16 Mar 2010 12:34:44 +0000 (12:34 +0000)
committerArtur Signell <artur.signell@itmill.com>
Tue, 16 Mar 2010 12:34:44 +0000 (12:34 +0000)
svn changeset:11908/svn branch:6.3

src/com/vaadin/ui/SplitPanel.java

index 1a149d7394325619ce2d724d161173546dcdaa9f..4319bf7d9c96a7a28f2ec62b8049f00c76ae1c49 100644 (file)
@@ -105,6 +105,11 @@ public class SplitPanel extends AbstractLayout {
     }
 
     public void setFirstComponent(Component c) {
+        if (firstComponent == c) {
+            // Nothing to do
+            return;
+        }
+
         if (firstComponent != null) {
             // detach old
             removeComponent(firstComponent);
@@ -114,6 +119,11 @@ public class SplitPanel extends AbstractLayout {
     }
 
     public void setSecondComponent(Component c) {
+        if (c == secondComponent) {
+            // Nothing to do
+            return;
+        }
+
         if (secondComponent != null) {
             // detach old
             removeComponent(secondComponent);