From 0ca022a124906efd10a13634866f81432af08b54 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Thu, 10 Jan 2019 19:58:30 +0100 Subject: [PATCH] Make sure ValidateControls detects the grid as focused when its grid contextmenu pops up, which is not the case when it has 0 nodes, even with TreeOptions.SelectionOptions.RightclickSelect enabled. See https://www.heidisql.com/forum.php?t=26329 --- source/main.pas | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/main.pas b/source/main.pas index bbea68b5..ead6f0e6 100644 --- a/source/main.pas +++ b/source/main.pas @@ -6465,6 +6465,9 @@ const begin // Manipulate quick filter menuitems Grid := ActiveGrid; + // Make sure ValidateControls detects the grid as focused, which is not the case when + // it has 0 nodes, even with TreeOptions.SelectionOptions.RightclickSelect enabled + Grid.SetFocus; CellFocused := Assigned(Grid.FocusedNode) and (Grid.FocusedColumn > NoColumn); InDataGrid := Grid = DataGrid; DataInsertValue.Enabled := CellFocused;