mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 06:22:30 +02:00
LCL: improved TCustomForm.DoExecuteAction, do not execute actions in design mode or if form is not visible
git-svn-id: trunk@14866 -
This commit is contained in:
parent
3b3a8da73c
commit
0c78a3c622
@ -1054,6 +1054,10 @@ function TCustomForm.DoExecuteAction(ExeAction: TBasicAction): boolean;
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
// don't execute action while designing or when form is not visible
|
||||||
|
if (csDesigning in ComponentState) or not Visible then
|
||||||
|
exit(false);
|
||||||
|
|
||||||
// assume it gets handled somewhere
|
// assume it gets handled somewhere
|
||||||
Result := true;
|
Result := true;
|
||||||
if assigned(ActiveControl) and ActiveControl.ExecuteAction(ExeAction)
|
if assigned(ActiveControl) and ActiveControl.ExecuteAction(ExeAction)
|
||||||
|
Loading…
Reference in New Issue
Block a user