From 547898dd51509deadc7bb245d6c192efb0dc785d Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Mon, 28 May 2018 09:08:36 +0700 Subject: [PATCH] Fixes sillsdev/keyman-issues#5557. Hide Debug Status form in Test Mode, prevents uninitialised data errors. --- .../TIKE/actions/dmActionsKeyboardEditor.dfm | 2 ++ .../src/developer/TIKE/child/UfrmDebug.dfm | 26 ++++++++++--------- .../src/developer/TIKE/child/UfrmDebug.pas | 5 +++- windows/src/developer/TIKE/main/UfrmMain.dfm | 8 ++++-- 4 files changed, 26 insertions(+), 15 deletions(-) diff --git a/windows/src/developer/TIKE/actions/dmActionsKeyboardEditor.dfm b/windows/src/developer/TIKE/actions/dmActionsKeyboardEditor.dfm index 45647f674c..15096c36e3 100644 --- a/windows/src/developer/TIKE/actions/dmActionsKeyboardEditor.dfm +++ b/windows/src/developer/TIKE/actions/dmActionsKeyboardEditor.dfm @@ -151,12 +151,14 @@ object modActionsKeyboardEditor: TmodActionsKeyboardEditor object actDebugTestMode: TAction Category = 'Debug Control' Caption = '&Test Mode' + GroupIndex = 1 OnExecute = actDebugTestModeExecute OnUpdate = actDebugTestModeUpdate end object actDebugDebuggerMode: TAction Category = 'Debug Control' Caption = '&Debugger Mode' + GroupIndex = 2 OnExecute = actDebugDebuggerModeExecute OnUpdate = actDebugDebuggerModeUpdate end diff --git a/windows/src/developer/TIKE/child/UfrmDebug.dfm b/windows/src/developer/TIKE/child/UfrmDebug.dfm index bdfa764c94..4d5e951134 100644 --- a/windows/src/developer/TIKE/child/UfrmDebug.dfm +++ b/windows/src/developer/TIKE/child/UfrmDebug.dfm @@ -22,21 +22,10 @@ inherited frmDebug: TfrmDebug Width = 755 Height = 73 Cursor = crIBeam - Align = alClient + Alignment = taLeftJustify BorderStyle = bsNone - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [] - ParentFont = False - PopupMenu = mnuPopup ScrollBars = ssVertical - TabOrder = 0 OnChange = memoChange - OnClick = memoClick - OnEnter = memoGotFocus - OnExit = memoLostFocus AltFont.Charset = DEFAULT_CHARSET AltFont.Color = clWindowText AltFont.Height = -11 @@ -65,6 +54,19 @@ inherited frmDebug: TfrmDebug UpdateMode = umImmediate Version = 'v7.1 Professional ed.' OnSelMove = memoSelMove + Align = alClient + Font.Charset = ANSI_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Arial' + Font.Style = [] + ParentFont = False + PopupMenu = mnuPopup + TabOrder = 0 + TabStop = True + OnClick = memoClick + OnEnter = memoGotFocus + OnExit = memoLostFocus OnMessage = memoMessage end object sgChars: TStringGrid diff --git a/windows/src/developer/TIKE/child/UfrmDebug.pas b/windows/src/developer/TIKE/child/UfrmDebug.pas index c16362cbed..5b437f4864 100644 --- a/windows/src/developer/TIKE/child/UfrmDebug.pas +++ b/windows/src/developer/TIKE/child/UfrmDebug.pas @@ -1287,13 +1287,16 @@ begin UpdateDebugStatusForm; // I4809 if FOldUIStatus = duiTest then begin + frmDebugStatus.Parent.Visible := True; if memo.Focused then begin GetParentForm(memo).ActiveControl := nil; //ActiveControl := memo; memo.SetFocus; end; - end; + end + else if FUIStatus = duiTest then + frmDebugStatus.Parent.Visible := False; end; end; diff --git a/windows/src/developer/TIKE/main/UfrmMain.dfm b/windows/src/developer/TIKE/main/UfrmMain.dfm index edf8327271..a1eb8350d0 100644 --- a/windows/src/developer/TIKE/main/UfrmMain.dfm +++ b/windows/src/developer/TIKE/main/UfrmMain.dfm @@ -76,6 +76,8 @@ inherited frmKeymanDeveloper: TfrmKeymanDeveloper Width = 82 Height = 22 Action = modActionsKeyboardEditor.actDebugTestMode + AllowAllUp = True + GroupIndex = 1 end object SpeedButton2: TSpeedButton Left = 83 @@ -83,6 +85,8 @@ inherited frmKeymanDeveloper: TfrmKeymanDeveloper Width = 98 Height = 22 Action = modActionsKeyboardEditor.actDebugDebuggerMode + AllowAllUp = True + GroupIndex = 2 end object cbDebugSystemKeyboard: TComboBox Left = 359 @@ -297,7 +301,7 @@ inherited frmKeymanDeveloper: TfrmKeymanDeveloper Left = 304 Top = 236 Bitmap = { - 494C01010A000E00EC0010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 + 494C01010A000E00F00010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 0000000000003600000028000000400000003000000001002000000000000030 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 @@ -706,7 +710,7 @@ inherited frmKeymanDeveloper: TfrmKeymanDeveloper Left = 236 Top = 236 Bitmap = { - 494C01013B004000EC0010001000C0C0C000FF10FFFFFFFFFFFFFFFF424D3600 + 494C01013B004000F00010001000C0C0C000FF10FFFFFFFFFFFFFFFF424D3600 000000000000360000002800000040000000F0000000010020000000000000F0 000000000000000000000000000000000000C0C0C000C0C0C000C0C0C000C0C0 C000C0C0C000C6C6C600F7730000CE5A0000CE5A0000F7730000C6C6C600C0C0