mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Ensured that sidebar has the right properties to show again
CL-541
This commit is contained in:
parent
7d9af8e345
commit
52a137a68c
4 changed files with 48 additions and 7 deletions
|
@ -21,6 +21,7 @@ class PrinterOutputModel(QObject):
|
|||
nameChanged = pyqtSignal()
|
||||
headPositionChanged = pyqtSignal()
|
||||
keyChanged = pyqtSignal()
|
||||
typeChanged = pyqtSignal()
|
||||
|
||||
def __init__(self, output_controller: "PrinterOutputController", number_of_extruders: int = 1, parent=None):
|
||||
super().__init__(parent)
|
||||
|
@ -35,6 +36,17 @@ class PrinterOutputModel(QObject):
|
|||
|
||||
self._printer_state = "unknown"
|
||||
|
||||
self._type = ""
|
||||
|
||||
@pyqtProperty(str, notify = typeChanged)
|
||||
def type(self):
|
||||
return self._type
|
||||
|
||||
def updateType(self, type):
|
||||
if self._type != type:
|
||||
self._type = type
|
||||
self.typeChanged.emit()
|
||||
|
||||
@pyqtProperty(str, notify=keyChanged)
|
||||
def key(self):
|
||||
return self._key
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue