PROP : Fix exception on CssSelectorCategory. 17/18517/1
authornakyoung2.choi <nakyoung2.choi@samsung.com>
Tue, 25 Mar 2014 06:44:00 +0000 (15:44 +0900)
committernakyoung2.choi <nakyoung2.choi@samsung.com>
Tue, 25 Mar 2014 06:44:00 +0000 (15:44 +0900)
Fix exception on CssSelectorCategory.

Change-Id: I22887264f4de10c199d9d13d4901fa32504559d1
Signed-off-by: nakyoung2.choi <nakyoung2.choi@samsung.com>
org.tizen.webuibuilder/src/org/tizen/webuibuilder/ui/views/properties/style/CssSelectorCategoryComposite.java
org.tizen.webuibuilder/src/org/tizen/webuibuilder/ui/views/properties/style/CssStyleTab.java

index 7a275e6..0e28043 100644 (file)
@@ -336,7 +336,10 @@ public class CssSelectorCategoryComposite extends CategoryComposite implements I
 
     private void clearListBox() {
         // clear items
-        listBox.remove(1, listBox.getItemCount() - 1);
+        int count = listBox.getItemCount();
+        if (count > 1) {
+            listBox.remove(1, listBox.getItemCount() - 1);    
+        }
     }
 
     protected void setBriefLabel() {
index 9d1c05e..3921fb2 100644 (file)
@@ -1275,6 +1275,7 @@ public class CssStyleTab extends PropertiesTabItem implements IPageDataListener
         if (methods == null || methods.isEmpty()) {
             if (mode.equals(PropertiesMode.DESIGN)) {
                 createDesignerContents();
+                setDefaultSelector();
             } else if (mode.equals(PropertiesMode.ANIMATOR)) {
                 createAnimatorContents();
             } else {