summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarc Englund <marc.englund@itmill.com>2008-03-10 09:18:36 +0000
committerMarc Englund <marc.englund@itmill.com>2008-03-10 09:18:36 +0000
commit11d54e8ed0fef5178c46987b67d6859ac1caedf8 (patch)
tree0dd353e23c8088a5594258377df27e2996a8831f /src
parentff625539f1aae9aee41e8af2aece0e5ac5461ad3 (diff)
downloadvaadin-framework-11d54e8ed0fef5178c46987b67d6859ac1caedf8.tar.gz
vaadin-framework-11d54e8ed0fef5178c46987b67d6859ac1caedf8.zip
Don't allow setting the same layout multiple times (caused bug)
svn changeset:4011/svn branch:trunk
Diffstat (limited to 'src')
-rw-r--r--src/com/itmill/toolkit/ui/Panel.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/itmill/toolkit/ui/Panel.java b/src/com/itmill/toolkit/ui/Panel.java
index db1f58646f..2084040427 100644
--- a/src/com/itmill/toolkit/ui/Panel.java
+++ b/src/com/itmill/toolkit/ui/Panel.java
@@ -122,6 +122,11 @@ public class Panel extends AbstractComponentContainer implements Scrollable,
layout.setMargin(true);
}
+ if (layout == this.layout) {
+ // don't set the same layout twice
+ return;
+ }
+
// Sets the panel to be parent for the layout
layout.setParent(this);