mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 14:04:03 -06:00
Groundwork for installing/updating packages
Contributes to: CURA-8587
This commit is contained in:
parent
08067432c6
commit
3b3d986058
4 changed files with 73 additions and 14 deletions
|
@ -20,12 +20,16 @@ class CuraPackageManager(PackageManager):
|
|||
def __init__(self, application: "QtApplication", parent: Optional["QObject"] = None) -> None:
|
||||
super().__init__(application, parent)
|
||||
self._locally_installed_packages = None
|
||||
self.installedPackagesChanged.connect(self._updateLocallyInstalledPackages)
|
||||
|
||||
def _updateLocallyInstalledPackages(self):
|
||||
self._locally_installed_packages = list(self.iterateAllLocalPackages())
|
||||
|
||||
@property
|
||||
def locally_installed_packages(self):
|
||||
"""locally installed packages, lazy execution"""
|
||||
if self._locally_installed_packages is None:
|
||||
self._locally_installed_packages = list(self.iterateAllLocalPackages())
|
||||
self._updateLocallyInstalledPackages()
|
||||
return self._locally_installed_packages
|
||||
|
||||
@locally_installed_packages.setter
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue