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:
Ansgar Becker
2011-01-19 20:11:45 +00:00
parent 82b45cf09e
commit 0911c8edad

View File

@ -244,6 +244,12 @@ begin
TreeObjects.Clear;
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
Node := MainForm.FindDBObjectNode(TreeObjects, DBObj);
if Assigned(Node) then