Reinitialize session node after creating a new database. See http://www.heidisql.com/forum.php?t=8311

This commit is contained in:
Ansgar Becker
2011-04-20 18:53:40 +00:00
parent 007ae9ced5
commit eadc009e27

View File

@ -7063,6 +7063,7 @@ procedure TMainForm.RefreshTree(FocusNewObject: TDBObject=nil);
var
DBNode: PVirtualNode;
OnlyDBNode: Boolean;
SessNode: PVirtualNode;
begin
// This refreshes exactly one session node and all its db and table nodes.
// Also, tries to focus the previous focused object, if present.
@ -7082,6 +7083,9 @@ begin
if not OnlyDBNode then begin
FocusNewObject.Connection.ClearAllDbObjects;
FocusNewObject.Connection.RefreshAllDatabases;
SessNode := GetRootNode(DBtree, FocusNewObject.Connection);
if Assigned(SessNode) then
DBtree.ReinitChildren(SessNode, False);
end else begin
FocusNewObject.Connection.ClearDbObjects(FocusNewObject.Database);
DBNode := FindDbNode(DBtree, FocusNewObject.Database);