Fix a similar problem as in previous commit - db and table nodes were not properly removed on disconnect. Probably fixes issue #1491.

This commit is contained in:
Ansgar Becker
2009-12-16 01:00:12 +00:00
parent 53c69a5f51
commit 8b34098669

View File

@@ -1571,11 +1571,9 @@ begin
comboOnlyDBs.ItemIndex := 0
else
comboOnlyDBs.Text := '';
// All db nodes must get collapsed to avoid auto initialization of table caches (along with AVs)
menuTreeCollapseAllClick(Self);
// Forces Tree.ReInitChildren to refetch database names
FreeAndNil(AllDatabases);
RefreshTree(False);
// Remove db and table nodes, force host node to initialize again
DBtree.ResetNode(DBTree.GetFirst);
DBTree.Color := GetRegValue(REGNAME_TREEBACKGROUND, clWindow, SessionName);