mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
CURA-5035 Added material authors + icons
This commit is contained in:
parent
b763b2a5a0
commit
7a0fe74989
6 changed files with 68 additions and 22 deletions
|
|
@ -69,7 +69,6 @@ class CuraPackageManager(QObject):
|
|||
|
||||
# (for initialize) Removes all packages that have been scheduled to be removed.
|
||||
def _removeAllScheduledPackages(self) -> None:
|
||||
print("Will purge", self._to_remove_package_set)
|
||||
for package_id in self._to_remove_package_set:
|
||||
self._purgePackage(package_id)
|
||||
self._to_remove_package_set.clear()
|
||||
|
|
@ -223,11 +222,7 @@ class CuraPackageManager(QObject):
|
|||
if package_id in self._to_install_package_dict:
|
||||
del self._to_install_package_dict[package_id]
|
||||
|
||||
# If the package has already been installed, schedule for a delayed removal
|
||||
# if package_id in self._installed_package_dict:
|
||||
# self._to_remove_package_set.add(package_id)
|
||||
# "Or rather don't because sometimes packages are not making it into the
|
||||
# dict I guess." - Ian
|
||||
# Schedule for a delayed removal:
|
||||
self._to_remove_package_set.add(package_id)
|
||||
|
||||
self._saveManagementData()
|
||||
|
|
@ -235,7 +230,6 @@ class CuraPackageManager(QObject):
|
|||
|
||||
# Removes everything associated with the given package ID.
|
||||
def _purgePackage(self, package_id: str) -> None:
|
||||
print("Purging",package_id)
|
||||
# Get all folders that need to be checked for installed packages, including:
|
||||
# - materials
|
||||
# - qualities
|
||||
|
|
@ -249,7 +243,6 @@ class CuraPackageManager(QObject):
|
|||
|
||||
for root_dir in dirs_to_check:
|
||||
package_dir = os.path.join(root_dir, package_id)
|
||||
print(package_dir)
|
||||
if os.path.exists(package_dir):
|
||||
Logger.log("i", "Removing '%s' for package [%s]", package_dir, package_id)
|
||||
shutil.rmtree(package_dir)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue