mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 07:03:56 -06:00
Remove unnecessary listening to switching extruder tabs
Also fix unnecessary emitting of switching extruder tabs. This should improve performance a lot. I tested a lot of things and am convinced that it didn't break anything. But the automated GUI tests and QA team should be the final arbiters of that... Contributes to issue CURA-6793.
This commit is contained in:
parent
b5c6a0a1e3
commit
ce4c5a1c93
5 changed files with 9 additions and 13 deletions
|
@ -139,8 +139,8 @@ class MachineManager(QObject):
|
|||
activeVariantChanged = pyqtSignal()
|
||||
activeQualityChanged = pyqtSignal()
|
||||
activeIntentChanged = pyqtSignal()
|
||||
activeStackChanged = pyqtSignal() # Emitted whenever the active extruder stack is changed (ie: when changing between extruders, changing a profile, but not when changing a value)
|
||||
extruderChanged = pyqtSignal()
|
||||
activeStackChanged = pyqtSignal() # Emitted whenever the active extruder stack is changed (ie: when switching the active extruder tab or changing between printers)
|
||||
extruderChanged = pyqtSignal() # Emitted whenever an extruder is activated or deactivated or the default extruder changes.
|
||||
|
||||
activeStackValueChanged = pyqtSignal() # Emitted whenever a value inside the active stack is changed.
|
||||
activeStackValidationChanged = pyqtSignal() # Emitted whenever a validation inside active container is changed
|
||||
|
@ -269,11 +269,7 @@ class MachineManager(QObject):
|
|||
|
||||
def _onActiveExtruderStackChanged(self) -> None:
|
||||
self.blurSettings.emit() # Ensure no-one has focus.
|
||||
if self._active_container_stack is not None:
|
||||
self._active_container_stack.pyqtContainersChanged.disconnect(self.activeStackChanged) # Unplug from the old one.
|
||||
self._active_container_stack = ExtruderManager.getInstance().getActiveExtruderStack()
|
||||
if self._active_container_stack is not None:
|
||||
self._active_container_stack.pyqtContainersChanged.connect(self.activeStackChanged) # Plug into the new one.
|
||||
|
||||
def __emitChangedSignals(self) -> None:
|
||||
self.activeQualityChanged.emit()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue