]> source.dussan.org Git - vaadin-framework.git/commitdiff
Corrected propertypanel bug #277 (?)
authorJoonas Lehtinen <joonas.lehtinen@itmill.com>
Mon, 5 Feb 2007 10:52:48 +0000 (10:52 +0000)
committerJoonas Lehtinen <joonas.lehtinen@itmill.com>
Mon, 5 Feb 2007 10:52:48 +0000 (10:52 +0000)
svn changeset:450/svn branch:toolkit

src/com/itmill/toolkit/demo/features/FeatureBrowser.java

index 2652c975a4515ca0f163fbba3d50829a3538fe32..081f766225eeb9fd68e5eee862fdd610216e428d 100644 (file)
@@ -214,8 +214,13 @@ public class FeatureBrowser extends CustomComponent implements
                                        currentFeature = feature;
                                        properties = feature.getPropertyPanel();
                                        if (properties != null) {
-                                               right.replaceComponent(properties, feature
-                                                               .getPropertyPanel());
+                                               Iterator i = right.getComponentIterator();
+                                               i.next();
+                                               PropertyPanel oldProps = (PropertyPanel) i.next();
+                                               if (oldProps != null)
+                                                       right.replaceComponent(oldProps, properties);
+                                               else 
+                                                       right.addComponent(properties);
                                                properties.setVisible(((Boolean) propertiesSelect
                                                                .getValue()).booleanValue());
                                        }