diff --git a/windows/src/desktop/kmshell/main/initprog.pas b/windows/src/desktop/kmshell/main/initprog.pas index 7d560f4b6b..b16756ce0f 100644 --- a/windows/src/desktop/kmshell/main/initprog.pas +++ b/windows/src/desktop/kmshell/main/initprog.pas @@ -480,7 +480,7 @@ begin fmTextEditor: begin // I2720 FMutex := TKeymanMutex.Create('KeymanTextEditor'); - if FMutex.MutexOwned then OpenTextEditor(nil) else FocusTextEditor; + if FMutex.MutexOwned then OpenTextEditor else FocusTextEditor; end; fmBaseKeyboard: // I4169 diff --git a/windows/src/desktop/kmshell/startup/help/UfrmTextEditor.pas b/windows/src/desktop/kmshell/startup/help/UfrmTextEditor.pas index fa62660d2a..bb0b638091 100644 --- a/windows/src/desktop/kmshell/startup/help/UfrmTextEditor.pas +++ b/windows/src/desktop/kmshell/startup/help/UfrmTextEditor.pas @@ -181,7 +181,7 @@ type public end; -procedure OpenTextEditor(Owner: TComponent = nil); // I2260 +procedure OpenTextEditor; // I2260 implementation @@ -223,20 +223,16 @@ resourcestring const GutterWid = 6; -procedure OpenTextEditor(Owner: TComponent = nil); // I2260 +procedure OpenTextEditor; // I2260 var frmTextEditor: TfrmTextEditor; begin - if ApplicationRunning then - begin - frmTextEditor := TfrmTextEditor.Create(nil); - frmTextEditor.Show; - end - else - begin - UfrmWebContainer.CreateForm(TfrmTextEditor, frmTextEditor); - frmTextEditor.Visible := True; - end; + UfrmWebContainer.CreateForm(TfrmTextEditor, frmTextEditor); + frmTextEditor.Visible := True; + ApplicationRunning := True; + Application.Run; + ApplicationRunning := False; + FreeAndNil(frmTextEditor); end; { TfrmTextEditor }