Fix cosmetic bug: If a user clicks in the empty space below the column names in ListColumns, the previously selected node is unselected but not unfocused (the dotted rectangle is kept). To be consistent, certain menu items have to be DISabled in that case, and only ENabled if a node is focused AND selected. Fixes doubleclicks in ListColumns calling the fieldeditor in "update column" mode, which should be rather (and is now) the "add column" mode for creating a new column.

This commit is contained in:
Ansgar Becker
2008-06-20 19:18:40 +00:00
parent de107dac5d
commit 81a21398f9

View File

@ -2763,10 +2763,10 @@ begin
// Toggle state of menuitems and buttons
btnTableDropField.Enabled := SomeSelected;
DropField1.Enabled := SomeSelected;
MenuEditField.Enabled := OneFocused;
btnTableEditField.enabled := OneFocused;
menuRenameColumn.Enabled := OneFocused;
menuEditField.Enabled := OneFocused;
MenuEditField.Enabled := OneFocused and SomeSelected;
btnTableEditField.enabled := OneFocused and SomeSelected;
menuRenameColumn.Enabled := OneFocused and SomeSelected;
menuEditField.Enabled := OneFocused and SomeSelected;
end;
@ -3077,7 +3077,7 @@ begin
fn := '';
fem := femFieldAdd;
if Assigned(ListColumns.FocusedNode) then
if Assigned(ListColumns.FocusedNode) and (vsSelected in ListColumns.FocusedNode.States) then
fn := ListColumns.Text[ListColumns.FocusedNode, 0];
if fn<>'' then