mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 16:16:05 +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;
|
||||
|
||||
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
|
||||
Result := true;
|
||||
if assigned(ActiveControl) and ActiveControl.ExecuteAction(ExeAction)
|
||||
|
Loading…
Reference in New Issue
Block a user