mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 20:00:16 +08:00
Mainform.SessionName is used for write operations to registry. If you
a) connect a session b) open the session manager c) rename the current session ... your registry has a nearly empty session folder, after DoDisconnect() stores the last active database with the old session name. This change fixes the SessionName variable and window caption immediately after a session was renamed.
This commit is contained in:
@ -473,6 +473,11 @@ begin
|
||||
SessionKey := REGPATH + REGKEY_SESSIONS + SelectedSession;
|
||||
if MainReg.KeyExists(SessionKey) then
|
||||
MainReg.MoveKey(SessionKey, REGPATH + REGKEY_SESSIONS + NewText, true);
|
||||
// Also fix internal session name in main form, which gets used to store e.g. "lastuseddb" later
|
||||
if Mainform.SessionName = SelectedSession then begin
|
||||
Mainform.SessionName := NewText;
|
||||
Mainform.SetWindowCaption;
|
||||
end;
|
||||
FSessionNames[FSessionNames.IndexOf(SelectedSession)] := NewText;
|
||||
RefreshSessionList(False);
|
||||
end;
|
||||
|
Reference in New Issue
Block a user