mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 01:07:52 -06:00
Fixed update buttons
Contributes to: CURA-8587
This commit is contained in:
parent
8dc88e52c2
commit
0299bb1694
3 changed files with 10 additions and 11 deletions
|
@ -368,13 +368,12 @@ class PackageModel(QObject):
|
|||
def isRecentlyUpdated(self):
|
||||
return self._package_id in self._package_manager.getPackagesToInstall() and self._package_id in self._package_manager.getPackagesToRemove()
|
||||
|
||||
@property
|
||||
def can_update(self) -> bool:
|
||||
"""Flag indicating if the package can be updated"""
|
||||
return self._can_update
|
||||
|
||||
@can_update.setter
|
||||
def can_update(self, value: bool) -> None:
|
||||
def setCanUpdate(self, value: bool) -> None:
|
||||
if value != self._can_update:
|
||||
self._can_update = value
|
||||
self.stateManageButtonChanged.emit()
|
||||
|
||||
@pyqtProperty(bool, fset = setCanUpdate, notify = stateManageButtonChanged)
|
||||
def canUpdate(self) -> bool:
|
||||
"""Flag indicating if the package can be updated"""
|
||||
return self._can_update
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue