Fix empty db name in query memo when doubleclicking db tree. See http://www.heidisql.com/forum.php?t=6588

This commit is contained in:
Ansgar Becker
2010-10-12 22:21:45 +00:00
parent 6c2a100945
commit 57fd30ceec

View File

@ -4899,9 +4899,14 @@ begin
// been performed in OnDragOver. So, only do typecasting here.
if src = DBtree then begin
// Insert table or database name. If a table is dropped and Shift is pressed, prepend the db name.
Text := mask(ActiveDbObj.Name);
if (ActiveDbObj.NodeType in [lntTable..lntEvent]) and ShiftPressed then
Text := mask(ActiveDbObj.Database) + '.' + Text;
case ActiveDbObj.NodeType of
lntDb: Text := mask(ActiveDbObj.Database);
lntTable..lntEvent: begin
if ShiftPressed then
Text := mask(ActiveDbObj.Database) + '.';
Text := Text + mask(ActiveDbObj.Name);
end;
end;
end else if src = Tree then begin
if (Tree.GetNodeLevel(Tree.FocusedNode) = 1) and Assigned(Tree.FocusedNode) then begin
case Tree.FocusedNode.Parent.Index of