mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 01:07:52 -06:00
Only emit signal if the properties actually changed
This commit is contained in:
parent
aef89e2bd3
commit
b61bf3df4d
1 changed files with 6 additions and 4 deletions
|
@ -35,8 +35,9 @@ class MultiBuildPlateModel(ListModel):
|
||||||
self._active_build_plate = -1
|
self._active_build_plate = -1
|
||||||
|
|
||||||
def setMaxBuildPlate(self, max_build_plate):
|
def setMaxBuildPlate(self, max_build_plate):
|
||||||
self._max_build_plate = max_build_plate
|
if self._max_build_plate != max_build_plate:
|
||||||
self.maxBuildPlateChanged.emit()
|
self._max_build_plate = max_build_plate
|
||||||
|
self.maxBuildPlateChanged.emit()
|
||||||
|
|
||||||
## Return the highest build plate number
|
## Return the highest build plate number
|
||||||
@pyqtProperty(int, notify = maxBuildPlateChanged)
|
@pyqtProperty(int, notify = maxBuildPlateChanged)
|
||||||
|
@ -44,8 +45,9 @@ class MultiBuildPlateModel(ListModel):
|
||||||
return self._max_build_plate
|
return self._max_build_plate
|
||||||
|
|
||||||
def setActiveBuildPlate(self, nr):
|
def setActiveBuildPlate(self, nr):
|
||||||
self._active_build_plate = nr
|
if self._active_build_plate != nr:
|
||||||
self.activeBuildPlateChanged.emit()
|
self._active_build_plate = nr
|
||||||
|
self.activeBuildPlateChanged.emit()
|
||||||
|
|
||||||
@pyqtProperty(int, notify = activeBuildPlateChanged)
|
@pyqtProperty(int, notify = activeBuildPlateChanged)
|
||||||
def activeBuildPlate(self):
|
def activeBuildPlate(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue