mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 16:56:01 +02:00
lcl: fix enabled handling of speedbutton (it could enter an endless loop before with repaint bugs #0008689, #0012911)
git-svn-id: trunk@18102 -
This commit is contained in:
parent
0a9b9940a9
commit
e04fd0e3a7
@ -288,7 +288,6 @@ type
|
||||
procedure SetNumGlyphs(Value: integer);
|
||||
procedure SetSpacing(const Value: integer);
|
||||
procedure RealSetText(const Value: TCaption); override;
|
||||
procedure SetEnabled(NewEnabled: boolean); override;
|
||||
procedure UpdateState(InvalidateOnChange: boolean); virtual;
|
||||
function GetDrawDetails: TThemedElementDetails; virtual;
|
||||
property MouseInControl: Boolean read FMouseInControl;
|
||||
|
@ -8,7 +8,7 @@
|
||||
* *
|
||||
* This file is part of the Lazarus Component Library (LCL) *
|
||||
* *
|
||||
* See the file COPYING.modifiedLGPL.txt, included in this distribution, *
|
||||
* See the file COPYING.modifiedLGPL.txt, included in this distribution, *
|
||||
* for details about the copyright. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
@ -167,12 +167,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomSpeedButton.SetEnabled(NewEnabled: boolean);
|
||||
begin
|
||||
inherited;
|
||||
UpdateState(true);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TCustomSpeedButton.SetFlat
|
||||
Params: Value:
|
||||
@ -181,7 +175,8 @@ end;
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TCustomSpeedButton.SetFlat(const Value : boolean);
|
||||
begin
|
||||
if FFlat <> Value then begin
|
||||
if FFlat <> Value then
|
||||
begin
|
||||
FFlat := Value;
|
||||
Invalidate;
|
||||
end;
|
||||
@ -935,7 +930,7 @@ end;
|
||||
procedure TCustomSpeedButton.CMEnabledChanged(var Message: TLMEssage);
|
||||
Begin
|
||||
//Should create a new glyph based on the new state
|
||||
Invalidate;
|
||||
UpdateState(true);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user