slider : set value to [] => 0 81/14381/1
Antoine ELIAS [Tue, 8 Apr 2014 17:23:29 +0000 (19:23 +0200)]
Change-Id: I0cc47c25897890cb80c7677ed8feead698c37823

scilab/modules/gui/src/java/org/scilab/modules/gui/bridge/slider/SwingScilabSlider.java

index 7836627..fee823c 100644 (file)
@@ -477,7 +477,12 @@ public class SwingScilabSlider extends JSlider implements SwingViewObject, Simpl
             }
             case __GO_UI_VALUE__ : {
                 Double[] doubleValue = ((Double[]) value);
-                setUserValue(doubleValue[0]);
+                if (doubleValue.length != 0) {
+                    setUserValue(doubleValue[0]);
+                } else {
+                    Double minValue = (Double) controller.getProperty(uid, __GO_UI_MIN__);
+                    setUserValue(minValue);
+                }
                 break;
             }
             default: {