mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -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)
|
Application.getInstance().globalContainerStackChanged.connect(self._onGlobalContainerChanged)
|
||||||
ExtruderManager.getInstance().activeExtruderChanged.connect(self._onActiveExtruderStackChanged)
|
ExtruderManager.getInstance().activeExtruderChanged.connect(self._onActiveExtruderStackChanged)
|
||||||
|
|
||||||
|
self._backend = Application.getInstance().getBackend()
|
||||||
|
|
||||||
def _reset(self):
|
def _reset(self):
|
||||||
global_container_stack = Application.getInstance().getGlobalContainerStack()
|
global_container_stack = Application.getInstance().getGlobalContainerStack()
|
||||||
if not global_container_stack:
|
if not global_container_stack:
|
||||||
|
@ -50,6 +52,15 @@ class MachineSettingsAction(MachineAction):
|
||||||
self._container_index = container_index
|
self._container_index = container_index
|
||||||
self.containerIndexChanged.emit()
|
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):
|
def _onActiveExtruderStackChanged(self):
|
||||||
global_container_stack = Application.getInstance().getGlobalContainerStack()
|
global_container_stack = Application.getInstance().getGlobalContainerStack()
|
||||||
extruder_container_stack = ExtruderManager.getInstance().getActiveExtruderStack()
|
extruder_container_stack = ExtruderManager.getInstance().getActiveExtruderStack()
|
||||||
|
|
|
@ -32,6 +32,18 @@ Cura.MachineAction
|
||||||
onTriggered: base.extruderTabsCount = (machineExtruderCountProvider.properties.value > 1) ? parseInt(machineExtruderCountProvider.properties.value) : 0
|
onTriggered: base.extruderTabsCount = (machineExtruderCountProvider.properties.value > 1) ? parseInt(machineExtruderCountProvider.properties.value) : 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Connections
|
||||||
|
{
|
||||||
|
target: dialog ? dialog : null
|
||||||
|
ignoreUnknownSignals: true
|
||||||
|
// Any which way this action dialog is dismissed, make sure it is properly finished
|
||||||
|
onNextClicked: manager.onFinishAction()
|
||||||
|
onBackClicked: manager.onFinishAction()
|
||||||
|
onAccepted: manager.onFinishAction()
|
||||||
|
onRejected: manager.onFinishAction()
|
||||||
|
onClosing: manager.onFinishAction()
|
||||||
|
}
|
||||||
|
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue