Changed some modal result checks to honour cancellation as mrNo. See merge request !281 issue #40920

This commit is contained in:
Martin 2024-05-20 02:35:01 +02:00
parent b593ba42f3
commit bab6ed4c4b
4 changed files with 5 additions and 5 deletions

View File

@ -368,7 +368,7 @@ begin
if TargetPackageFile <> APackageFile then
begin
if FileExists(TargetPackageFile) then
if MessageDlgEx(Format(rsCreateRepositoryFrm_Conf2, [TargetPackageFile]), mtInformation, [mbYes, mbNo], Self) = mrNo then
if MessageDlgEx(Format(rsCreateRepositoryFrm_Conf2, [TargetPackageFile]), mtInformation, [mbYes, mbNo], Self) <> mrYes then
Result := True;
if (not Result) and (not CopyFile(APackageFile, TargetPackageFile, [cffOverwriteFile], True)) then

View File

@ -335,8 +335,8 @@ begin
if OpenSSLFrm.cbPermanent.Checked then
begin
case OpenSSLFrm.ModalResult of
mrYes: Options.OpenSSLDownloadType := 0;
mrNo: Options.OpenSSLDownloadType := 2;
mrYes : Options.OpenSSLDownloadType := 0;
mrNo, mrCancel: Options.OpenSSLDownloadType := 2;
end
end;
finally

View File

@ -1762,7 +1762,7 @@ begin
if IDEMessageDialog(lisDeleteAmbiguousFile,
Format(lisAmbiguousFileFoundThisFileCanBeMistakenWithDelete,
[CurFilename, LineEnding, ShortFilename, LineEnding+LineEnding]),
mtConfirmation,[mbYes,mbNo])=mrNo
mtConfirmation,[mbYes,mbNo])<>mrYes
then continue;
end;
if EnvironmentOptions.AmbiguousFileAction in [afaAutoDelete,afaAsk]

View File

@ -5716,7 +5716,7 @@ begin
Format(lisPkgMangThePackageWasMarkedCurrentlyLazarus,
[APackage.IDAsString, LineEnding, LineEnding+LineEnding]),
mtConfirmation,[mbYes,mbNo]);
if Result=mrNo then begin
if Result<>mrYes then begin
Result:=mrOk;
exit;
end;