mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 03:07:53 -06:00
To be removed packages are still listed for the current session
A user might still need to interact with a **to be removed** package and it is also still being used in the current Cura session. But the current package list doesn't list that package anymore. Introduced a `getPackagesToRemove()` method in the Uranium PackageManager to circumvent this issue. Contributes to CURA-8558
This commit is contained in:
parent
8fad2e0f39
commit
080e3b9f27
1 changed files with 8 additions and 6 deletions
|
@ -70,9 +70,11 @@ class LocalPackageList(PackageList):
|
|||
|
||||
def _allPackageInfo(self):
|
||||
manager = self._application.getPackageManager()
|
||||
for package_id in manager.getAllInstalledPackageIDs():
|
||||
package_data = manager.getInstalledPackageInfo(package_id)
|
||||
bundled_or_installed = "bundled" if package_data["is_bundled"] else "installed"
|
||||
package_type = package_data["package_type"]
|
||||
package_data["section_title"] = self.PACKAGE_SECTION_HEADER[bundled_or_installed][package_type]
|
||||
yield package_data
|
||||
for package_type, packages in manager.getAllInstalledPackagesInfo().items():
|
||||
for package_data in packages:
|
||||
bundled_or_installed = "installed" if manager.isUserInstalledPackage(package_data["package_id"]) else "bundled"
|
||||
package_data["section_title"] = self.PACKAGE_SECTION_HEADER[bundled_or_installed][package_type]
|
||||
yield package_data
|
||||
|
||||
for package_data in manager.getPackagesToRemove().values():
|
||||
yield package_data["package_info"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue