mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 03:46:05 +08:00
Only emit signal when the active extruder actually changes
This commit is contained in:
parent
858886d6b7
commit
4e8fb254f6
@ -96,8 +96,9 @@ class ExtruderManager(QObject):
|
|||||||
# \param index The index of the new active extruder.
|
# \param index The index of the new active extruder.
|
||||||
@pyqtSlot(int)
|
@pyqtSlot(int)
|
||||||
def setActiveExtruderIndex(self, index):
|
def setActiveExtruderIndex(self, index):
|
||||||
self._active_extruder_index = index
|
if self._active_extruder_index != index:
|
||||||
self.activeExtruderChanged.emit()
|
self._active_extruder_index = index
|
||||||
|
self.activeExtruderChanged.emit()
|
||||||
|
|
||||||
@pyqtProperty(int, notify = activeExtruderChanged)
|
@pyqtProperty(int, notify = activeExtruderChanged)
|
||||||
def activeExtruderIndex(self):
|
def activeExtruderIndex(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user