mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-14 01:56:36 +08:00
Store selected database object and its properties in a copied TDBObject, instead of referencing an item from TDBConnection.FDatabases[x]. Not sure if that's a good idea as there may be logic somewhere which now updates the temporary copy, not the reference. But at least this fixes issue #2579.
This commit is contained in:
@ -4451,6 +4451,7 @@ begin
|
||||
Size := s.Size;
|
||||
FCreateCode := s.FCreateCode;
|
||||
FCreateCodeFetched := s.FCreateCodeFetched;
|
||||
FViewSelectCode := s.FViewSelectCode;
|
||||
end else
|
||||
inherited;
|
||||
end;
|
||||
|
@ -6793,7 +6793,8 @@ begin
|
||||
actDataPostChangesExecute(DataGrid);
|
||||
|
||||
DBObj := Sender.GetNodeData(Node);
|
||||
FActiveDbObj := DBObj^;
|
||||
FActiveDbObj := TDBObject.Create(DBObj.Connection);
|
||||
FActiveDbObj.Assign(DBObj^);
|
||||
|
||||
case FActiveDbObj.NodeType of
|
||||
lntNone: begin
|
||||
@ -6861,7 +6862,7 @@ begin
|
||||
ShowStatusMsg(FActiveDbObj.Connection.Parameters.NetTypeName(FActiveDbObj.Connection.Parameters.NetType, False)+' '+FActiveDbObj.Connection.ServerVersionStr, 3);
|
||||
end else begin
|
||||
LogSQL('DBtreeFocusChanged without node.', lcDebug);
|
||||
FActiveDbObj := nil;
|
||||
FreeAndNil(FActiveDbObj);
|
||||
MainTabToActivate := tabHost;
|
||||
tabHost.Caption := 'Host';
|
||||
tabDatabase.Caption := 'Database';
|
||||
|
Reference in New Issue
Block a user