Update position when parent is known. 82/13082/1
Bruno JOFRET [Tue, 5 Nov 2013 13:28:48 +0000 (14:28 +0100)]
Change-Id: If3be2f5509901da870381dfff234cbb04e9bf694

scilab/modules/gui/src/java/org/scilab/modules/gui/SwingView.java

index daa8e47..a55f6d8 100644 (file)
@@ -820,7 +820,10 @@ public final class SwingView implements GraphicView {
 
                 /* Add an uicontrol */
                 if (childType == __GO_UICONTROL__) {
-                    ((SwingScilabTab) updatedComponent).addMember(allObjects.get(childId).getValue());
+                    SwingViewObject uiContol = allObjects.get(childId).getValue();
+                    ((SwingScilabTab) updatedComponent).addMember(uiContol);
+                    // Force Position
+                    uiContol.update(__GO_POSITION__, (Double[]) GraphicController.getController().getProperty(childId, __GO_POSITION__));
                     needRevalidate = true;
                 }