diff --git a/lcl/buttons.pp b/lcl/buttons.pp index 7e795a3c6d..d2718c61ce 100644 --- a/lcl/buttons.pp +++ b/lcl/buttons.pp @@ -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; diff --git a/lcl/include/speedbutton.inc b/lcl/include/speedbutton.inc index 49978754b4..56dccc3e79 100644 --- a/lcl/include/speedbutton.inc +++ b/lcl/include/speedbutton.inc @@ -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; {------------------------------------------------------------------------------