Switch between correct states of the un-/installed buttons

Contributes to CURA-8587
This commit is contained in:
Jelle Spijker 2021-12-15 17:51:38 +01:00
parent 0ffaafc8c0
commit 23cc7084c4
No known key found for this signature in database
GPG key ID: 6662DC033BE6B99A
3 changed files with 12 additions and 6 deletions

View file

@ -314,7 +314,6 @@ class PackageModel(QObject):
@pyqtSlot()
def uninstall(self):
self.setBusy(True)
self.uninstallPackageTriggered.emit(self.packageId)
@pyqtProperty(bool, notify= busyChanged)
@ -351,7 +350,11 @@ class PackageModel(QObject):
@pyqtProperty(bool, notify = stateManageButtonChanged)
def isInstalled(self) -> bool:
return self._package_id in self._package_manager.local_packages_ids
return self._package_id in self._package_manager.getAllInstalledPackageIDs()
@pyqtProperty(bool, notify = stateManageButtonChanged)
def isToBeInstalled(self) -> bool:
return self._package_id in self._package_manager.getPackagesToInstall()
@pyqtProperty(bool, notify = stateManageButtonChanged)
def isActive(self) -> bool: