VM List: remove combo item when refreshed vm list
authorjihye424.kim <jihye424.kim@samsung.com>
Wed, 16 Sep 2015 08:47:26 +0000 (17:47 +0900)
committerjihye424.kim <jihye424.kim@samsung.com>
Wed, 16 Sep 2015 08:47:26 +0000 (17:47 +0900)
- add redraw() when changed status of combo box

Change-Id: I3ac751bdd4a19261f2d41770892fda6291cf78a8
Signed-off-by: jihye424.kim <jihye424.kim@samsung.com>
src/org/tizen/emulator/manager/ui/renewal/tableviewer/VMListTable.java
src/org/tizen/emulator/manager/ui/renewal/widgets/CreateVMCombo.java

index 87d48f9..27f3a14 100644 (file)
@@ -251,6 +251,7 @@ public class VMListTable {
 
        public void setVMList() {
                table.removeAll();
+               createVM.removeAll();
 
                for (ProfileButton pButton : profileButtonList) {
                        if (pButton.getProfile() == null) {
@@ -344,6 +345,7 @@ public class VMListTable {
                                }
                        }
                });
+               resetButton.setToolTipText("reset emulator");
 
                exportButton = new ImageButton(comp, SWT.PUSH);
                exportButton.setBackground(null);
@@ -359,6 +361,7 @@ public class VMListTable {
                                }
                        }
                });
+               exportButton.setToolTipText("create new base image");
 
                deleteButton = new ImageButton(comp, SWT.PUSH);
                deleteButton.setBackground(null);
@@ -374,6 +377,7 @@ public class VMListTable {
                                }
                        }
                });
+               deleteButton.setToolTipText("delete emulator");
 
                modifyButton = new ImageButton(comp, SWT.PUSH);
                modifyButton.setBackground(null);
@@ -389,6 +393,7 @@ public class VMListTable {
                                }
                        }
                });
+               modifyButton.setToolTipText("modify emulator");
 
                launchButton = new ImageButton(comp, SWT.PUSH);
                launchButton.setBackground(null);
@@ -404,6 +409,7 @@ public class VMListTable {
                                }
                        }
                });
+               launchButton.setToolTipText("launch emulator");
 
                resetButton.setEnabled(false);
                exportButton.setEnabled(false);
index a47ebd2..1c7c7d4 100644 (file)
@@ -183,18 +183,27 @@ public class CreateVMCombo extends Canvas {
                if (items != null) {
                        items.remove(index);
                }
+               if (selectedIndex == index) {
+                       deselect();
+               }
        }
 
        public void removeAll() {
                if (items != null) {
                        items.clear();
                }
-               selectedIndex = -1;
-               selectedItem = null;
 
                if (!popup.isDispose()) {
                        popup.dispose();
                }
+
+               deselect();
+       }
+
+       private void deselect() {
+               selectedIndex = -1;
+               selectedItem = null;
+               redraw();
        }
 
        // for CreateVMComboPopup