]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixed a bug when setting the style of the object before adding it
authorJoonas Lehtinen <joonas.lehtinen@itmill.com>
Wed, 31 Jan 2007 11:15:54 +0000 (11:15 +0000)
committerJoonas Lehtinen <joonas.lehtinen@itmill.com>
Wed, 31 Jan 2007 11:15:54 +0000 (11:15 +0000)
svn changeset:377/svn branch:toolkit

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

index 1212271b294b8d95b888627508f0f3a8cc3705db..ade6effe54242ebb13a1b55f9d289268594d1116 100644 (file)
@@ -234,12 +234,21 @@ public class PropertyPanel
                                "Sample System Error" });
 
                // Style
+               String currentStyle = ((Component)objectToConfigure).getStyle();
+               if (currentStyle == null)
                set
                        .replaceWithSelect(
                                "style",
                                new Object[] { null },
                                new Object[] { "Default" })
                        .setNewItemsAllowed(true);
+               else
+                       set
+                       .replaceWithSelect(
+                               "style",
+                               new Object[] { null, currentStyle },
+                               new Object[] { "Default", currentStyle })
+                       .setNewItemsAllowed(true);
 
                // Set up descriptions
                set.getField("caption").setDescription(