diff --git a/source/main.pas b/source/main.pas index 177c2a29..e7dbfeff 100644 --- a/source/main.pas +++ b/source/main.pas @@ -6417,8 +6417,7 @@ begin Exit; end; end; - if (not DBtree.Dragging) - and ((PageControlMain.ActivePage = tabHost) or(PageControlMain.ActivePage = tabData)) then + if (not DBtree.Dragging) and (not QueryTabActive) then PageControlMain.ActivePage := tabDatabase; tabDatabase.TabVisible := true; tabEditor.TabVisible := false;