Return focused tree item in GetFocusedObjects() even if tree is not focused, in cases where database tab does not has focus. Fixes issue #3146.

This commit is contained in:
Ansgar Becker
2013-03-26 05:23:39 +00:00
parent ca9acecf72
commit 1e0463bd08

View File

@ -3317,7 +3317,7 @@ var
begin begin
// Find out if user rightclicked in tree or in database tab, // Find out if user rightclicked in tree or in database tab,
// which is a bit complex, so outsourced here. // which is a bit complex, so outsourced here.
Result := DBTree.Focused; Result := DBTree.Focused or (PageControlMain.ActivePage <> tabDatabase);
if Sender is TAction then begin if Sender is TAction then begin
ClickedControl := (Sender as TAction).ActionComponent; ClickedControl := (Sender as TAction).ActionComponent;
if ClickedControl is TMenuItem then begin if ClickedControl is TMenuItem then begin