mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-14 01:56:36 +08:00
Tree.Parent is in a special case a form, but it could also turn into some panel or whatever in the future. Be more stable when detecting the origin of the tree.
This commit is contained in:
@ -6657,7 +6657,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
lntTable, lntView:
|
||||
if Sender.Parent is TfrmSelectDBObject then begin
|
||||
if GetParentFormOrFrame(Sender) is TfrmSelectDBObject then begin
|
||||
Columns := TTableColumnList.Create(True);
|
||||
DBObj.Connection.ParseTableStructure(DBObj.CreateCode, Columns, nil, nil);
|
||||
ChildCount := Columns.Count;
|
||||
@ -6693,8 +6693,8 @@ begin
|
||||
2: begin
|
||||
DBObjects := FConnections[Node.Parent.Parent.Index].GetDBObjects(FConnections[Node.Parent.Parent.Index].AllDatabases[Node.Parent.Index]);
|
||||
Item^ := DBObjects[Node.Index];
|
||||
if (Sender.Parent is TfrmSelectDBObject) and (Item.NodeType in [lntTable, lntView]) then
|
||||
InitialStates := InitialStates + [ivsHasChildren];
|
||||
if (GetParentFormOrFrame(Sender) is TfrmSelectDBObject) and (Item.NodeType in [lntTable, lntView]) then
|
||||
Include(InitialStates, ivsHasChildren);
|
||||
end;
|
||||
3: begin
|
||||
Item^ := TDBObject.Create(FConnections[Node.Parent.Parent.Parent.Index]);
|
||||
|
Reference in New Issue
Block a user