mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-04 23:17:49 +01:00
IdeProject: Check mrCancel returning when the dialog is closed by the button in the caption, or pressing [ESC]/[Alt+F4]. Issue #40920
This commit is contained in:
parent
6d54f9ad91
commit
fddfc23bf8
@ -1641,6 +1641,7 @@ begin
|
||||
ACaption:=lisCodeToolsDefsWriteError;
|
||||
AText:=Format(lisUnableToWriteFile2, [Filename]);
|
||||
Result:=IDEMessageDialog(ACaption,AText,mtError,mbAbortRetryIgnore);
|
||||
if Result=mrCancel then exit; // dialog closed via button in caption or [Esc]/[Alt+F4]
|
||||
if Result=mrAbort then exit;
|
||||
if Result=mrIgnore then Result:=mrOk;
|
||||
end;
|
||||
@ -1664,6 +1665,7 @@ begin
|
||||
ACaption:=lisCodeToolsDefsWriteError;
|
||||
AText:=Format(lisUnableToWriteFile2, [AFilename]);
|
||||
Result:=IDEMessageDialog(ACaption,AText,mtError,mbAbortRetryIgnore);
|
||||
if Result=mrCancel then exit; // dialog closed via button in caption or [Esc]/[Alt+F4]
|
||||
if Result=mrAbort then exit;
|
||||
if Result=mrIgnore then Result:=mrOk;
|
||||
end else
|
||||
@ -1687,7 +1689,7 @@ begin
|
||||
ACaption:=lisCodeToolsDefsReadError;
|
||||
AText:=Format(lisUnableToReadFile2, [Filename]);
|
||||
Result:=IDEMessageDialog(ACaption,AText,mtError,mbAbortRetryIgnore);
|
||||
if Result in [mrAbort,mrIgnore] then
|
||||
if Result in [mrAbort,mrIgnore,mrCancel] then
|
||||
exit;
|
||||
end else begin
|
||||
Source:=NewSource;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user