From 86031234acb2a04baf3c295ea045ca1bb0a6a00a Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Tue, 15 Sep 2009 18:47:27 +0000 Subject: [PATCH] When a db node gets checked, its not yet initialized children are unchecked - fix that. --- source/tabletools.pas | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/tabletools.pas b/source/tabletools.pas index b49bf3d5..a8a47b11 100644 --- a/source/tabletools.pas +++ b/source/tabletools.pas @@ -180,8 +180,10 @@ begin case Sender.GetNodeLevel(Node) of 1: begin // Preselect active database - if Mainform.Databases[Node.Index] = Mainform.ActiveDatabase then + if Mainform.Databases[Node.Index] = Mainform.ActiveDatabase then begin Node.CheckState := csCheckedNormal; + TreeObjects.ReinitChildren(Node, False); + end; ValidateControls(Sender); end; 2: begin @@ -189,7 +191,9 @@ begin ds := Mainform.FetchDbTableList(Mainform.Databases[ParentNode.Index]); ds.RecNo := Node.Index+1; if not (GetDBObjectType(ds.Fields) in [lntTable, lntCrashedTable, lntView]) then - Node.CheckType := ctNone; + Node.CheckType := ctNone + else if Node.Parent.CheckState in [csCheckedNormal, csCheckedPressed] then + Node.CheckState := csCheckedNormal; end; end; end;