create vm table: set disable 'confirm' button
authorjihye424.kim <jihye424.kim@samsung.com>
Tue, 5 Jan 2016 09:33:09 +0000 (18:33 +0900)
committerjihye424.kim <jihye424.kim@samsung.com>
Tue, 5 Jan 2016 09:33:09 +0000 (18:33 +0900)
- set disable 'confirm' button, when template list is empty

Change-Id: Ie93afbb1a8e277faa12e8d4cabd5bfda20eba56a
Signed-off-by: jihye424.kim <jihye424.kim@samsung.com>
src/org/tizen/emulator/manager/ui/renewal/tableviewer/CreateVMTable.java
src/org/tizen/emulator/manager/ui/renewal/tableviewer/CreateVMTableViewer.java

index 872bfae..659b0bc 100644 (file)
@@ -111,6 +111,9 @@ public class CreateVMTable {
 
                if (table.getItemCount() > 0) {
                        table.setSelection(0);
+               } else {
+                       // set template is null;
+                       viewer.setTemplate(null);
                }
        }
 
index 8756de2..16cd6ad 100644 (file)
@@ -256,8 +256,6 @@ public class CreateVMTableViewer extends AbstractTableViewer {
                        table.showTable();
                }
 
-
-
                checkValid();
        }
 
@@ -269,16 +267,17 @@ public class CreateVMTableViewer extends AbstractTableViewer {
        public void setTemplate(DeviceTemplate template) {
                this.template = template;
 
-               if (newValue == null) {
-                       settingVMPropertyValue();
-               }
-
-               // check camera
-               resetCameraOption();
+               if (this.template != null) {
+                       if (newValue == null) {
+                               settingVMPropertyValue();
+                       }
 
-               // check skin list
-               resetSkinList(template.getValue().getResolution());
+                       // check camera
+                       resetCameraOption();
 
+                       // check skin list
+                       resetSkinList(template.getValue().getResolution());
+               }
                checkValid();
        }