mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 00:02:03 +02:00
TTaskDialog: fix Result value of Execute method:
- previously it returned True if the dialog succeeded to show, even if the dialog was cancelled. - now it is False if the dialog is canceled. - See https://docwiki.embarcadero.com/Libraries/Alexandria/en/Vcl.Dialogs.TCustomTaskDialog.Execute
This commit is contained in:
parent
0804282d52
commit
cbd7579c15
@ -147,7 +147,7 @@ begin
|
||||
FQueryResult := '';
|
||||
ButtonID := TWSTaskDialogClass(WidgetSetClass).Execute(Self, ParentWnd, ARadioRes);
|
||||
FModalResult := ButtonIDToModalResult(ButtonID);
|
||||
Result := (ButtonID >= 0);
|
||||
Result := (ButtonID >= 0) and (ModalResult <> mrCancel);
|
||||
if (ARadioRes >= TaskDialogFirstRadioButtonIndex) and (aRadioRes-TaskDialogFirstRadioButtonIndex < RadioButtons.Count) then
|
||||
FRadioButton := RadioButtons[ARadioRes-TaskDialogFirstRadioButtonIndex] as TTaskDialogRadioButtonItem
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user