IDE: Remove the "Ignore" option for uninstalling dependent packages. Fix the "Cancel" option.

This commit is contained in:
Juha 2023-07-26 10:23:58 +03:00
parent d0a134acdc
commit 318fa86019
2 changed files with 8 additions and 3 deletions

View File

@ -532,7 +532,7 @@ var
i: Integer;
begin
for i:=0 to NewInstalledPackages.Count-1 do
if SysUtils.CompareText(TLazPackageID(NewInstalledPackages[i]).Name,PkgName)=0 then
if CompareText(TLazPackageID(NewInstalledPackages[i]).Name,PkgName)=0 then
exit(true);
Result:=false;
end;
@ -742,6 +742,12 @@ begin
Result:=PackageEditingInterface.CheckInstallPackageList(
FNewInstalledPackages,UninstallPkgs,[piiifRemoveConflicts]);
if not Result then begin
AssignOldInstalledPackagesToList; // Restore the old list.
UpdateNewInstalledPackages;
UpdateAvailablePackages(True);
UpdateButtonStates;
end;
finally
UninstallPkgs.Free;
end;

View File

@ -5841,14 +5841,13 @@ begin
if s='' then continue;
case IDEQuestionDialog(lisUninstallFail,
Format(lisThePackageIsUsedBy, [APackage.IDAsString])+sLineBreak +s,
mtConfirmation, [mrYes, lisUninstallThemToo, mrIgnore, mrCancel]
mtConfirmation, [mrYes, lisUninstallThemToo, mrCancel]
) of
mrYes:
begin
for j:=0 to Dependencies.Count-1 do
DeleteDependency(TPkgDependency(Dependencies[j]));
end;
mrIgnore: ;
else
exit(false);
end;