mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Merge branch 'master' into WIP_improve_initialization
This commit is contained in:
commit
f395f1eebc
8 changed files with 42 additions and 26 deletions
|
@ -89,7 +89,6 @@ class CuraPackageManager(QObject):
|
|||
"installed": self._installed_package_dict,
|
||||
"to_remove": list(self._to_remove_package_set),
|
||||
"to_install": self._to_install_package_dict}
|
||||
data_dict["to_remove"] = list(data_dict["to_remove"])
|
||||
json.dump(data_dict, f, sort_keys = True, indent = 4)
|
||||
Logger.log("i", "Package management file %s was saved", self._user_package_management_file_path)
|
||||
|
||||
|
@ -103,7 +102,6 @@ class CuraPackageManager(QObject):
|
|||
|
||||
# (for initialize) Installs all packages that have been scheduled to be installed.
|
||||
def _installAllScheduledPackages(self) -> None:
|
||||
|
||||
while self._to_install_package_dict:
|
||||
package_id, package_info = list(self._to_install_package_dict.items())[0]
|
||||
self._installPackage(package_info)
|
||||
|
@ -111,6 +109,12 @@ class CuraPackageManager(QObject):
|
|||
del self._to_install_package_dict[package_id]
|
||||
self._saveManagementData()
|
||||
|
||||
def getBundledPackageInfo(self, package_id: str) -> Optional[dict]:
|
||||
package_info = None
|
||||
if package_id in self._bundled_package_dict:
|
||||
package_info = self._bundled_package_dict[package_id]["package_info"]
|
||||
return package_info
|
||||
|
||||
# Checks the given package is installed. If so, return a dictionary that contains the package's information.
|
||||
def getInstalledPackageInfo(self, package_id: str) -> Optional[dict]:
|
||||
if package_id in self._to_remove_package_set:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue