mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Pause autoslicing while the MachineSettingsAction is open
Each setting-change would cause a reslice, which is unnecessary.
This commit is contained in:
parent
4d12ab1296
commit
ba229444b7
2 changed files with 23 additions and 0 deletions
|
@ -34,6 +34,8 @@ class MachineSettingsAction(MachineAction):
|
|||
Application.getInstance().globalContainerStackChanged.connect(self._onGlobalContainerChanged)
|
||||
ExtruderManager.getInstance().activeExtruderChanged.connect(self._onActiveExtruderStackChanged)
|
||||
|
||||
self._backend = Application.getInstance().getBackend()
|
||||
|
||||
def _reset(self):
|
||||
global_container_stack = Application.getInstance().getGlobalContainerStack()
|
||||
if not global_container_stack:
|
||||
|
@ -50,6 +52,15 @@ class MachineSettingsAction(MachineAction):
|
|||
self._container_index = container_index
|
||||
self.containerIndexChanged.emit()
|
||||
|
||||
# Disable autoslicing while the machineaction is showing
|
||||
self._backend.disableTimer()
|
||||
|
||||
@pyqtSlot()
|
||||
def onFinishAction(self):
|
||||
# Restore autoslicing when the machineaction is dismissed
|
||||
if self._backend.determineAutoSlicing():
|
||||
self._backend.tickle()
|
||||
|
||||
def _onActiveExtruderStackChanged(self):
|
||||
global_container_stack = Application.getInstance().getGlobalContainerStack()
|
||||
extruder_container_stack = ExtruderManager.getInstance().getActiveExtruderStack()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue