From 2a973ceb54520425efd43276f587c703894dd748 Mon Sep 17 00:00:00 2001 From: sekelsenmat Date: Fri, 31 Aug 2012 09:30:25 +0000 Subject: [PATCH] Fixes bug #22718. Fixes ShowModal for WinCE git-svn-id: trunk@38449 - --- lcl/include/customform.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lcl/include/customform.inc b/lcl/include/customform.inc index 4001a11313..e56f6cdb44 100644 --- a/lcl/include/customform.inc +++ b/lcl/include/customform.inc @@ -2915,8 +2915,13 @@ begin // set our modalresult to mrCancel before hiding. if ModalResult = 0 then ModalResult := mrCancel; - Hide; + // We should always re-enabled the forms before issuing Hide() + // Because otherwise we will for a short amount of time have + // all forms disabled, and some systems, like WinCE, will interprete this + // as a problem in the application and hide it. + // See bug 22718 Screen.EnableForms(DisabledList); + Hide; RestoreFocusedForm; end; finally