Skip to content

Commit fd05816

Browse files
committed
fix: restore displayed session name in message dialog caption, was removed in commit:63028518f8b0d5869383d3bc0c42f188851797ed
See https://www.heidisql.com/forum.php?t=45080
1 parent 8bf4764 commit fd05816

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

source/apphelpers.pas

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2512,6 +2512,8 @@ function MessageDialog(const Title, Msg: string; DlgType: TMsgDlgType; Buttons:
25122512
end;
25132513
if Title <> Dialog.Caption then
25142514
Dialog.Title := Title;
2515+
if Assigned(MainForm) and (MainForm.ActiveConnection <> nil) and (MainForm.ActiveConnection.Parameters <> nil) then
2516+
Dialog.Caption := MainForm.ActiveConnection.Parameters.SessionName + ': ' + Dialog.Caption;
25152517
rx := TRegExpr.Create;
25162518
rx.Expression := 'https?://[^\s"]+';
25172519
if ThemeIsDark then

source/dbconnection.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2235,7 +2235,7 @@ destructor TDBConnection.Destroy;
22352235
FInformationSchemaObjects.Free;
22362236
FNamedEnums.Free;
22372237
if FOwnsParameters then
2238-
FParameters.Free;
2238+
FreeAndNil(FParameters);
22392239
inherited;
22402240
end;
22412241

0 commit comments

Comments
 (0)