mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 05:09:09 +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 SetNumGlyphs(Value: integer);
|
||||||
procedure SetSpacing(const Value: integer);
|
procedure SetSpacing(const Value: integer);
|
||||||
procedure RealSetText(const Value: TCaption); override;
|
procedure RealSetText(const Value: TCaption); override;
|
||||||
procedure SetEnabled(NewEnabled: boolean); override;
|
|
||||||
procedure UpdateState(InvalidateOnChange: boolean); virtual;
|
procedure UpdateState(InvalidateOnChange: boolean); virtual;
|
||||||
function GetDrawDetails: TThemedElementDetails; virtual;
|
function GetDrawDetails: TThemedElementDetails; virtual;
|
||||||
property MouseInControl: Boolean read FMouseInControl;
|
property MouseInControl: Boolean read FMouseInControl;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* *
|
* *
|
||||||
* This file is part of the Lazarus Component Library (LCL) *
|
* 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. *
|
* for details about the copyright. *
|
||||||
* *
|
* *
|
||||||
* This program is distributed in the hope that it will be useful, *
|
* This program is distributed in the hope that it will be useful, *
|
||||||
@ -167,12 +167,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomSpeedButton.SetEnabled(NewEnabled: boolean);
|
|
||||||
begin
|
|
||||||
inherited;
|
|
||||||
UpdateState(true);
|
|
||||||
end;
|
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: TCustomSpeedButton.SetFlat
|
Method: TCustomSpeedButton.SetFlat
|
||||||
Params: Value:
|
Params: Value:
|
||||||
@ -181,7 +175,8 @@ end;
|
|||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
procedure TCustomSpeedButton.SetFlat(const Value : boolean);
|
procedure TCustomSpeedButton.SetFlat(const Value : boolean);
|
||||||
begin
|
begin
|
||||||
if FFlat <> Value then begin
|
if FFlat <> Value then
|
||||||
|
begin
|
||||||
FFlat := Value;
|
FFlat := Value;
|
||||||
Invalidate;
|
Invalidate;
|
||||||
end;
|
end;
|
||||||
@ -935,7 +930,7 @@ end;
|
|||||||
procedure TCustomSpeedButton.CMEnabledChanged(var Message: TLMEssage);
|
procedure TCustomSpeedButton.CMEnabledChanged(var Message: TLMEssage);
|
||||||
Begin
|
Begin
|
||||||
//Should create a new glyph based on the new state
|
//Should create a new glyph based on the new state
|
||||||
Invalidate;
|
UpdateState(true);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user