mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
Database node was not removed after DROP DATABASE action. Fixes issue #1474. Described access violation unreproducible here any longer, probably fixed earlier.
This commit is contained in:
@@ -2154,6 +2154,7 @@ var
|
||||
msg, activeDB : WideString;
|
||||
InDBTree: Boolean;
|
||||
Act: TAction;
|
||||
Node: PVirtualNode;
|
||||
|
||||
procedure DoDrop(Kind: String; List: TWideStringlist; MultiDrops: Boolean);
|
||||
var
|
||||
@@ -2200,9 +2201,11 @@ begin
|
||||
Abort;
|
||||
try
|
||||
Connection.Query('DROP DATABASE ' + mask(activeDB));
|
||||
DBtree.FocusedNode := DBtree.GetFirst;
|
||||
DBTree.Selected[DBtree.FocusedNode] := True;
|
||||
Node := DBTree.FocusedNode;
|
||||
SelectNode(DBTree, DBtree.GetFirst);
|
||||
Connection.ClearDbObjects(activeDB);
|
||||
FreeAndNil(AllDatabases);
|
||||
DBTree.DeleteNode(Node);
|
||||
RefreshTree(False);
|
||||
except
|
||||
on E:Exception do
|
||||
|
||||
Reference in New Issue
Block a user