From f44d19cb56a61c4e25d87202464b0c60ea8d05d9 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Sun, 14 Feb 2010 16:58:56 +0000 Subject: [PATCH] Consistently update SQL viewer for selected process node, in "Processes" tab. Also, make it more clear if no process is selected. Fixes issue #1693. --- source/main.pas | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/source/main.pas b/source/main.pas index 23d1dcaa..01d34fe3 100644 --- a/source/main.pas +++ b/source/main.pas @@ -5883,9 +5883,14 @@ begin pnlProcessView.Enabled := enableSQLView; if enableSQLView then begin NodeData := ListProcesses.GetNodeData(Node); + SynMemoProcessView.Highlighter := SynSQLSyn1; SynMemoProcessView.Text := NodeData.Captions[7]; - end - else SynMemoProcessView.Clear; + SynMemoProcessView.Color := clWindow; + end else begin + SynMemoProcessView.Highlighter := nil; + SynMemoProcessView.Text := 'Please select a process in the above list.'; + SynMemoProcessView.Color := clBtnFace; + end; end; @@ -7931,6 +7936,9 @@ begin FreeAndNil(Results); vt.RootNodeCount := Length(VTRowDataListProcesses); vt.SortTree(vt.Header.SortColumn, vt.Header.SortDirection); + // Reset focused node and column, so OnFocusChange will fire, and update the SQL viewer + vt.FocusedNode := nil; + vt.FocusedColumn := NoColumn; SetVTSelection(vt, Sel); // Apply or reset filter editFilterVTChange(Sender);