]> O.S.I.I.S - jp/crow.git/commitdiff
move computeCursorPosition outside UpdateGraphic (not always called), should call...
authorjpbruyere <jp.bruyere@hotmail.com>
Thu, 11 Feb 2016 12:16:19 +0000 (13:16 +0100)
committerjpbruyere <jp.bruyere@hotmail.com>
Thu, 11 Feb 2016 12:16:19 +0000 (13:16 +0100)
src/GraphicObjects/Slider.cs

index a9bb5b8efd8dff5505f3bf9114e642bd28864050..faaacd784833b8c7538877092d3f2271d9136025 100644 (file)
@@ -106,20 +106,15 @@ namespace Crow
                        get { return base.Focusable; }
                        set { base.Focusable = value; }
                }
-               //TODO:seems strange to trigger layout computation in an
-               //overriding of updateGraphic
-               protected override void UpdateGraphic ()
-               {
-                       if (Maximum > 0)
-                               computeCursorPosition();
-                       base.UpdateGraphic ();
-               }
 
                protected override void onDraw (Context gr)
                {
                        base.onDraw (gr);
                        if (Maximum <= 0)
                                return;
+
+                       computeCursorPosition ();
+
                        Rectangle r = ClientRectangle;
                        PointD pStart;
                        PointD pEnd;