mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-16 20:11:48 +08:00
Reinitialize session node after creating a new database. See http://www.heidisql.com/forum.php?t=8311
This commit is contained in:
@ -7063,6 +7063,7 @@ procedure TMainForm.RefreshTree(FocusNewObject: TDBObject=nil);
|
|||||||
var
|
var
|
||||||
DBNode: PVirtualNode;
|
DBNode: PVirtualNode;
|
||||||
OnlyDBNode: Boolean;
|
OnlyDBNode: Boolean;
|
||||||
|
SessNode: PVirtualNode;
|
||||||
begin
|
begin
|
||||||
// This refreshes exactly one session node and all its db and table nodes.
|
// This refreshes exactly one session node and all its db and table nodes.
|
||||||
// Also, tries to focus the previous focused object, if present.
|
// Also, tries to focus the previous focused object, if present.
|
||||||
@ -7082,6 +7083,9 @@ begin
|
|||||||
if not OnlyDBNode then begin
|
if not OnlyDBNode then begin
|
||||||
FocusNewObject.Connection.ClearAllDbObjects;
|
FocusNewObject.Connection.ClearAllDbObjects;
|
||||||
FocusNewObject.Connection.RefreshAllDatabases;
|
FocusNewObject.Connection.RefreshAllDatabases;
|
||||||
|
SessNode := GetRootNode(DBtree, FocusNewObject.Connection);
|
||||||
|
if Assigned(SessNode) then
|
||||||
|
DBtree.ReinitChildren(SessNode, False);
|
||||||
end else begin
|
end else begin
|
||||||
FocusNewObject.Connection.ClearDbObjects(FocusNewObject.Database);
|
FocusNewObject.Connection.ClearDbObjects(FocusNewObject.Database);
|
||||||
DBNode := FindDbNode(DBtree, FocusNewObject.Database);
|
DBNode := FindDbNode(DBtree, FocusNewObject.Database);
|
||||||
|
Reference in New Issue
Block a user