Commit a7be8c9c authored by Bart B's avatar Bart B 🐞
Browse files

LCL: fix TTaskDialog.ModalResult if closebutton (in CommonButtons) is clicked. Issue #36069.

git-svn-id: trunk@61947 -
parent ed3cfadc
......@@ -99,7 +99,19 @@ function TCustomTaskDialog.ButtonIDToModalResult(const AButtonID: Integer
): TModalResult;
begin
if AButtonID<100 then
Result := AButtonID
begin
case AButtonID of
IDOK: Result := mrOK;
IDCANCEL: Result := mrCancel;
IDABORT: Result := mrAbort;
IDRETRY: Result := mrRetry;
IDIGNORE: Result := mrIgnore;
IDYES: Result := mrYes;
IDNO: Result := mrNo;
IDCLOSE: Result := mrClose;
else Result := AButtonID
end;
end
else if (AButtonID-100<Buttons.Count) then
Result := Buttons[AButtonID-100].ModalResult
else
......
......@@ -446,7 +446,7 @@ end;
const
TD_BTNMOD: array[TCommonButton] of Integer = (
mrOk, mrYes, mrNo, mrCancel, mrRetry, mrAbort);
mrOk, mrYes, mrNo, mrCancel, mrRetry, mrClose);
function TD_BTNS(button: TCommonButton): pointer;
begin
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment