mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06:00
Persistent handled state across Package Lists
Contributes to: CURA-8587
This commit is contained in:
parent
2d9c557a13
commit
325783ca46
5 changed files with 26 additions and 13 deletions
|
@ -57,10 +57,13 @@ class LocalPackageList(PackageList):
|
|||
|
||||
def _makePackageModel(self, package_info: Dict[str, Any]) -> PackageModel:
|
||||
""" Create a PackageModel from the package_info and determine its section_title"""
|
||||
bundled_or_installed = "installed" if self._manager.isUserInstalledPackage(package_info["package_id"]) else "bundled"
|
||||
|
||||
bundled_or_installed = "bundled" if self._manager.isBundledPackage(package_info["package_id"]) else "installed"
|
||||
package_type = package_info["package_type"]
|
||||
section_title = self.PACKAGE_CATEGORIES[bundled_or_installed][package_type]
|
||||
package = PackageModel(package_info, section_title = section_title, parent = self)
|
||||
if package_info["package_id"] in self._manager.getPackagesToRemove() or package_info["package_id"] in self._manager.getPackagesToInstall():
|
||||
package.is_recently_managed = True
|
||||
self._connectManageButtonSignals(package)
|
||||
return package
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue