From 0c78a3c62247df38510f5c224f124e253c95f9fc Mon Sep 17 00:00:00 2001 From: vincents Date: Thu, 17 Apr 2008 13:14:54 +0000 Subject: [PATCH] LCL: improved TCustomForm.DoExecuteAction, do not execute actions in design mode or if form is not visible git-svn-id: trunk@14866 - --- lcl/include/customform.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lcl/include/customform.inc b/lcl/include/customform.inc index e6960311c1..bbbf77b800 100644 --- a/lcl/include/customform.inc +++ b/lcl/include/customform.inc @@ -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)