From: jpbruyere Date: Thu, 11 Feb 2016 12:16:19 +0000 (+0100) Subject: move computeCursorPosition outside UpdateGraphic (not always called), should call... X-Git-Tag: 0.3~7 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=44caf51048bde7e9daf78acc779278642c798748;p=jp%2Fcrow.git move computeCursorPosition outside UpdateGraphic (not always called), should call it less in the future --- diff --git a/src/GraphicObjects/Slider.cs b/src/GraphicObjects/Slider.cs index a9bb5b8e..faaacd78 100644 --- a/src/GraphicObjects/Slider.cs +++ b/src/GraphicObjects/Slider.cs @@ -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;