LCL/Trackbar: Avoid massive slow-down when drawing too many ticks (https://forum.lazarus.freepascal.org/index.php/topic,46606.msg332640).

git-svn-id: trunk@61810 -
This commit is contained in:
wp 2019-09-02 17:42:37 +00:00
parent e06e1746df
commit 5217a2df4e

View File

@ -364,6 +364,9 @@ begin
if AMin > AMax then AMin := AMax;
if APosition < AMin then APosition := AMin;
if APosition > AMax then APosition := AMax;
if AMax - AMin > $3FFF then
// avoid massive slow-down when drawing too many tick marks
SetTickStyle(tsNone);
end;
class function TCustomTrackBar.GetControlClassDefaultSize: TSize;