LCL: TControl.Click: fixed check if OnClick differs from Action.OnExecute

git-svn-id: trunk@32579 -
This commit is contained in:
mattias 2011-10-01 07:51:58 +00:00
parent f87dae15c5
commit 8b557e425b

View File

@ -2300,7 +2300,10 @@ procedure TControl.Click;
begin
//DebugLn(['TControl.Click ',DbgSName(Self)]);
if (not (csDesigning in ComponentState)) and (ActionLink <> nil) and
((Action=nil) or (@FOnClick <> @Action.OnExecute) or Assigned(FOnClick)) then
((Action=nil)
or (not CompareMem(@FOnClick, @Action.OnExecute, SizeOf(TMethod)))
or Assigned(FOnClick))
then
ActionLink.Execute(Self)
else
if Assigned(FOnClick) then