Permalink
Browse files

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
  • Loading branch information...
ansgarbecker committed Jan 10, 2019
1 parent 6918f06 commit 0ca022a124906efd10a13634866f81432af08b54
Showing with 3 additions and 0 deletions.
  1. +3 −0 source/main.pas
@@ -6465,6 +6465,9 @@ procedure TMainForm.popupDataGridPopup(Sender: TObject);
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;

0 comments on commit 0ca022a

Please sign in to comment.