Skip to content

Commit a6d6e70

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 f8c4bde commit a6d6e70

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
@@ -2367,6 +2367,8 @@ function MessageDialog(const Title, Msg: string; DlgType: TMsgDlgType; Buttons:
23672367
end;
23682368
if Title <> Dialog.Caption then
23692369
Dialog.Title := Title;
2370+
if Assigned(MainForm) and (MainForm.ActiveConnection <> nil) and (MainForm.ActiveConnection.Parameters <> nil) then
2371+
Dialog.Caption := MainForm.ActiveConnection.Parameters.SessionName + ': ' + Dialog.Caption;
23702372
rx := TRegExpr.Create;
23712373
rx.Expression := 'https?://[^\s"]+';
23722374
if ThemeIsDark then

source/dbconnection.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2158,7 +2158,7 @@ destructor TDBConnection.Destroy;
21582158
FInformationSchemaObjects.Free;
21592159
FNamedEnums.Free;
21602160
if FOwnsParameters then
2161-
FParameters.Free;
2161+
FreeAndNil(FParameters);
21622162
inherited;
21632163
end;
21642164

0 commit comments

Comments
 (0)