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

This commit is contained in:
Ansgar Becker
2019-01-10 19:58:30 +01:00
parent 6918f06680
commit 0ca022a124

View File

@@ -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;