mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 16:40:32 +02:00
LCL: TControl.Click: call OnClick if set and differs from Action for Delphi compatibility
git-svn-id: trunk@32583 -
This commit is contained in:
parent
8cc6b6ba82
commit
50ff6b7890
@ -2299,10 +2299,13 @@ end;
|
||||
procedure TControl.Click;
|
||||
begin
|
||||
//DebugLn(['TControl.Click ',DbgSName(Self)]);
|
||||
if (not (csDesigning in ComponentState)) and (ActionLink <> nil) then
|
||||
if Assigned(FOnClick) and (Action<>nil)
|
||||
and (not CompareMethods(TMethod(Action.OnExecute),TMethod(FOnClick))) then
|
||||
// the OnClick is set and differs from the Action => call the OnClick
|
||||
FOnClick(Self)
|
||||
else if (not (csDesigning in ComponentState)) and (ActionLink <> nil) then
|
||||
ActionLink.Execute(Self)
|
||||
else
|
||||
if Assigned(FOnClick) then
|
||||
else if Assigned(FOnClick) then
|
||||
FOnClick(Self);
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user