mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Enable or disable a plugin functionality added
Contributes to: CURA-8587
This commit is contained in:
parent
ea85e59e50
commit
579cc7bdbc
2 changed files with 16 additions and 4 deletions
|
@ -287,8 +287,6 @@ class PackageModel(QObject):
|
|||
if self._is_recently_managed:
|
||||
return "hidden"
|
||||
if self._package_type == "material":
|
||||
if self._is_bundled: # TODO: Check if a bundled material can/should be un-/install en-/disabled
|
||||
return "secondary"
|
||||
return "hidden"
|
||||
if not self._is_installed:
|
||||
return "hidden"
|
||||
|
@ -306,6 +304,16 @@ class PackageModel(QObject):
|
|||
self._is_enabling = value
|
||||
self.stateManageButtonChanged.emit()
|
||||
|
||||
@property
|
||||
def is_active(self) -> bool:
|
||||
return self._is_active
|
||||
|
||||
@is_active.setter
|
||||
def is_active(self, value: bool) -> None:
|
||||
if value != self._is_active:
|
||||
self._is_active = value
|
||||
self.stateManageButtonChanged.emit()
|
||||
|
||||
# --- Installing ---
|
||||
|
||||
@pyqtProperty(str, notify = stateManageButtonChanged)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue