mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 20:00:16 +08:00
Fix a focus-issue for rightclicking in ListTables. ValidateControls is called by OnClick, but rightclicking doesn't seem to call OnClick. So, add ValidateControls to popupDbGrid.OnPopup.
Also checking the focused node doesn't say if some nodes are selected. A focused node can even be unselected in the way that its background is not highlighted. So, rather check the selection in ValidateControls.
This commit is contained in:
@ -711,6 +711,8 @@ var
|
||||
SelectedEngine : String;
|
||||
NodeData : PVTreeData;
|
||||
begin
|
||||
ValidateControls;
|
||||
|
||||
if ListTables.SelectedCount <> 1 then
|
||||
begin
|
||||
Exit;
|
||||
@ -2333,7 +2335,7 @@ begin
|
||||
// not table (now invisibly) selected on the database grid.
|
||||
if (PageControlMain.ActivePage <> tabDatabase) then ListTables.FocusedNode := nil;
|
||||
|
||||
tableSelected := Assigned(ListTables.FocusedNode) and FrmIsFocussed;
|
||||
tableSelected := (Length(ListTables.GetSortedSelection(False))>0) and FrmIsFocussed;
|
||||
btnDbProperties.Enabled := tableSelected;
|
||||
menuproperties.Enabled := tableSelected;
|
||||
btnDbInsertRecord.Enabled := tableSelected;
|
||||
|
Reference in New Issue
Block a user