mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-06 05:58:06 +02:00
LazControls: Revert the earlier change in TCustomCheckBoxThemed, issue #39425.
This commit is contained in:
parent
232ed8531c
commit
51cdd4d4c4
@ -467,12 +467,14 @@ begin
|
||||
if [csLoading, csDestroying, csDesigning]*ComponentState = [] then begin
|
||||
if Assigned(OnEditingDone) then OnEditingDone(self);
|
||||
if Assigned(OnChange) then OnChange(self);
|
||||
{ Execute only when Action.Checked is changed }
|
||||
// Execute only when Action.Checked is changed
|
||||
if not CheckFromAction then begin
|
||||
if Assigned(OnClick) and not Assigned(Action) then
|
||||
OnClick(self);
|
||||
if (Action is TCustomAction) and
|
||||
(TCustomAction(Action).Checked <> (AValue = cbChecked))
|
||||
// Call OnClick only if its handler differs from the Action's handler.
|
||||
if Assigned(OnClick) and
|
||||
not (Assigned(Action) and SameMethod(TMethod(Action.OnExecute),TMethod(OnClick)))
|
||||
then OnClick(self);
|
||||
// Then the action
|
||||
if (Action is TCustomAction) and (TCustomAction(Action).Checked<>(AValue=cbChecked))
|
||||
then ActionLink.Execute(self);
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user