NSCREEN : initial style apply bug fixed 84/21184/1
authorjooyoul_lee <jy.exe.lee@samsung.com>
Fri, 16 May 2014 03:22:44 +0000 (12:22 +0900)
committerjooyoul_lee <jy.exe.lee@samsung.com>
Fri, 16 May 2014 03:22:44 +0000 (12:22 +0900)
start time css style applied

Change-Id: I1f962ec205918d5070a4bd8e665c3945fc457c5b
Signed-off-by: jooyoul_lee <jy.exe.lee@samsung.com>
org.tizen.webuibuilder/src/org/tizen/webuibuilder/ui/editor/PageDesigner.java
org.tizen.webuibuilder/src/org/tizen/webuibuilder/ui/editor/PageDesignerToolbar.java

index e5eaa1a..16c53c1 100644 (file)
@@ -381,7 +381,9 @@ public class PageDesigner extends GraphicalEditor implements CommandStackListene
 
         NScreenUtil.nscreen_log("current page css : "
                 + pageData.getCurrentCssFile().getCssFilePath());
-        getViewer().updateStyle();
+        if (getViewer() != null) {
+            getViewer().updateStyle();
+        }
 
     }
 
@@ -407,19 +409,6 @@ public class PageDesigner extends GraphicalEditor implements CommandStackListene
 
     protected void clearSelectorsOfRootPart() {
         rootPart.clearAllSelector();
-        // CssFile currentCssFile = pageData.getCurrentCssFile();
-        // Collection<CssSelector> selectors = rootPart.getSelectors();
-        // for (CssSelector selector : currentCssFile.getSelectors()) {
-        // String pageId = selector.getPageId();
-        // Part pagePart = rootPart.getChildOfIdPropertyValue(pageId, true);
-        // if (pagePart != null) {
-        // String partId = selector.getPartId();
-        // Part part = rootPart.getChildOfIdPropertyValue(partId, true);
-        // if (part != null) {
-        // part.removeSelector(selector.getSelectorName(), false);
-        // }
-        // }
-        // }
     }
 
     private DescriptorManager getDescriptorManager() {
index 085bb84..67d77f7 100644 (file)
@@ -203,10 +203,12 @@ public class PageDesignerToolbar implements ISelectionListener {
         }
         nscreen = new NScreenHistory();
         nscreen.setLastResolution(device.getDisplayName());
+        nscreen.setModelName(BuilderConstants.NSCREENCOMMON);
         nscreen.setScale(1f);
         currentScreen = resolution.getScreenSize(device.getDisplayName());
 
         screenSizeText.setText(currentScreen.getScreenSize());
+        mainEditor.setNscreenIndex2(device, nscreen);
     }
 
     public void setResolution(List<Device> devices, NScreenItem nsItem) {