mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-14 18:12:05 +08:00
Init all objects in active db before preselecting, so the tree does not just check the parent db node when we only want the first object in it. Fixes issue #2267.
This commit is contained in:
@ -244,6 +244,12 @@ begin
|
|||||||
TreeObjects.Clear;
|
TreeObjects.Clear;
|
||||||
TreeObjects.RootNodeCount := Mainform.DBtree.RootNodeCount;
|
TreeObjects.RootNodeCount := Mainform.DBtree.RootNodeCount;
|
||||||
|
|
||||||
|
// Init all objects in active database, so the tree does not just check the db node
|
||||||
|
// if we want the first child only. See issue #2267.
|
||||||
|
Node := MainForm.FindDBNode(TreeObjects, MainForm.ActiveDatabase);
|
||||||
|
Node := TreeObjects.GetFirstChild(Node);
|
||||||
|
while Assigned(Node) do
|
||||||
|
Node := TreeObjects.GetNextSibling(Node);
|
||||||
for DBObj in PreSelectObjects do begin
|
for DBObj in PreSelectObjects do begin
|
||||||
Node := MainForm.FindDBObjectNode(TreeObjects, DBObj);
|
Node := MainForm.FindDBObjectNode(TreeObjects, DBObj);
|
||||||
if Assigned(Node) then
|
if Assigned(Node) then
|
||||||
|
Reference in New Issue
Block a user