Skip to content

Commit

Permalink
Disable copy paste when either 3mf reader or writer is disabled
Browse files Browse the repository at this point in the history
CURA-7913
  • Loading branch information
casperlamboo committed Aug 8, 2023
1 parent 8ed0731 commit 73bbf21
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions UM/PackageManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,16 @@ def removeFromDismissedPackages(self, package: str) -> None:
def isPackageInstalled(self, package_id: str) -> bool:
return self.getInstalledPackageInfo(package_id) is not None

# Checks if the given package is installed and enabled.
@pyqtProperty("QList<QString>", notify=installedPackagesChanged)
def allEnabledPackages(self) -> List[str]:
enabled_packages = []
for package_id in self.getAllInstalledPackageIDs():
package_info = self.getInstalledPackageInfo(package_id)
if package_info is not None and package_info["is_active"]:
enabled_packages.append(package_id)
return enabled_packages

@pyqtSlot(QUrl)
def installPackageViaDragAndDrop(self, file_url: str) -> None:
"""This is called by drag-and-dropping curapackage files."""
Expand Down

0 comments on commit 73bbf21

Please sign in to comment.