From 4067090770d184c1127d6ae019f6d8402803518f Mon Sep 17 00:00:00 2001 From: micha Date: Sun, 9 Jul 2006 14:56:22 +0000 Subject: [PATCH] only change "down" state when mouse button released with control area (issue #1859) git-svn-id: trunk@9577 - --- lcl/include/speedbutton.inc | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/lcl/include/speedbutton.inc b/lcl/include/speedbutton.inc index f489efb248..63e7211178 100644 --- a/lcl/include/speedbutton.inc +++ b/lcl/include/speedbutton.inc @@ -605,18 +605,15 @@ begin if FDragging then begin Assert(False,'Trace:FDragging is true'); - if not FDown then - NewState := bsUp - else - NewState := bsExclusive; - - if (X >= 0) and (X < Width) - and (Y >= 0) and (Y < Height) - then begin - if FDown then - NewState := bsExclusive + if FDown then + NewState := bsExclusive + else begin + if (X >= 0) and (X < Width) + and (Y >= 0) and (Y < Height) + then + NewState := bsDown else - NewState := bsDown; + NewState := bsUp; end; if NewState <> FState @@ -649,10 +646,10 @@ begin then begin FState := bsUp; if OldState<>FState then Invalidate; - end - else begin + end + else if (X >= 0) and (X < Width) + and (Y >= 0) and (Y < Height) then SetDown(not FDown); - end; end; inherited MouseUp(Button, Shift, X, Y); end;