* Bug #10346 fixed - An uicontrol was visible during few milliseconds even if its
[scilab.git] / scilab / modules / gui / src / java / org / scilab / modules / gui / SwingView.java
index 97498bf..62b80bd 100644 (file)
@@ -490,6 +490,9 @@ public final class SwingView implements GraphicView {
      * @param id the uicontrol id
      */
     private void setDefaultProperties(Widget uiControlObject, String id) {
+        /* Visible property is set first to avoid to see the object rendered before all its properties to be set (See bug #10346) */
+        SwingViewWidget.update(uiControlObject, __GO_VISIBLE__,
+                               (Boolean) GraphicController.getController().getProperty(id, __GO_VISIBLE__));
         SwingViewWidget.update(uiControlObject, __GO_UI_BACKGROUNDCOLOR__,
                                (Double[]) GraphicController.getController().getProperty(id, __GO_UI_BACKGROUNDCOLOR__));
         SwingViewWidget.update(uiControlObject, __GO_UI_ENABLE__,
@@ -518,8 +521,6 @@ public final class SwingView implements GraphicView {
                                (String) GraphicController.getController().getProperty(id, __GO_UI_VERTICALALIGNMENT__));
         SwingViewWidget.update(uiControlObject, __GO_POSITION__,
                                (Double[]) GraphicController.getController().getProperty(id, __GO_POSITION__));
-        SwingViewWidget.update(uiControlObject, __GO_VISIBLE__,
-                               (Boolean) GraphicController.getController().getProperty(id, __GO_VISIBLE__));
     }
 
     @Override