mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 22:19:18 +02:00
LCL: fix TTaskDialog.ModalResult if closebutton (in CommonButtons) is clicked. Issue #0036069.
git-svn-id: trunk@61947 -
This commit is contained in:
parent
ed3cfadcf4
commit
a7be8c9c96
@ -99,7 +99,19 @@ function TCustomTaskDialog.ButtonIDToModalResult(const AButtonID: Integer
|
|||||||
): TModalResult;
|
): TModalResult;
|
||||||
begin
|
begin
|
||||||
if AButtonID<100 then
|
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
|
else if (AButtonID-100<Buttons.Count) then
|
||||||
Result := Buttons[AButtonID-100].ModalResult
|
Result := Buttons[AButtonID-100].ModalResult
|
||||||
else
|
else
|
||||||
|
@ -446,7 +446,7 @@ end;
|
|||||||
|
|
||||||
const
|
const
|
||||||
TD_BTNMOD: array[TCommonButton] of Integer = (
|
TD_BTNMOD: array[TCommonButton] of Integer = (
|
||||||
mrOk, mrYes, mrNo, mrCancel, mrRetry, mrAbort);
|
mrOk, mrYes, mrNo, mrCancel, mrRetry, mrClose);
|
||||||
|
|
||||||
function TD_BTNS(button: TCommonButton): pointer;
|
function TD_BTNS(button: TCommonButton): pointer;
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user