mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-19 04:37:51 -06:00
Update stack error checking when switching matchines - CURA-4447
This commit is contained in:
parent
5d51d547da
commit
c1139c5c45
1 changed files with 9 additions and 0 deletions
|
@ -341,6 +341,7 @@ class MachineManager(QObject):
|
||||||
self.activeQualityChanged.emit()
|
self.activeQualityChanged.emit()
|
||||||
self.activeVariantChanged.emit()
|
self.activeVariantChanged.emit()
|
||||||
self.activeMaterialChanged.emit()
|
self.activeMaterialChanged.emit()
|
||||||
|
self._updateStacksHaveErrors() # Prevents unwanted re-slices after changing machine
|
||||||
self._error_check_timer.start()
|
self._error_check_timer.start()
|
||||||
|
|
||||||
def _onInstanceContainersChanged(self, container):
|
def _onInstanceContainersChanged(self, container):
|
||||||
|
@ -357,6 +358,8 @@ class MachineManager(QObject):
|
||||||
@pyqtSlot(str)
|
@pyqtSlot(str)
|
||||||
def setActiveMachine(self, stack_id: str) -> None:
|
def setActiveMachine(self, stack_id: str) -> None:
|
||||||
self.blurSettings.emit() # Ensure no-one has focus.
|
self.blurSettings.emit() # Ensure no-one has focus.
|
||||||
|
self._cancelDelayedActiveContainerStackChanges()
|
||||||
|
|
||||||
containers = ContainerRegistry.getInstance().findContainerStacks(id = stack_id)
|
containers = ContainerRegistry.getInstance().findContainerStacks(id = stack_id)
|
||||||
if containers:
|
if containers:
|
||||||
Application.getInstance().setGlobalContainerStack(containers[0])
|
Application.getInstance().setGlobalContainerStack(containers[0])
|
||||||
|
@ -895,6 +898,12 @@ class MachineManager(QObject):
|
||||||
self._active_container_stack.variant = self._new_variant_container
|
self._active_container_stack.variant = self._new_variant_container
|
||||||
self._new_variant_container = None
|
self._new_variant_container = None
|
||||||
|
|
||||||
|
## Cancel set changes for material and variant in the active container stack.
|
||||||
|
# Used for ignoring any changes when switching between printers (setActiveMachine)
|
||||||
|
def _cancelDelayedActiveContainerStackChanges(self):
|
||||||
|
self._new_material_container = None
|
||||||
|
self._new_variant_container = None
|
||||||
|
|
||||||
## Determine the quality and quality changes settings for the current machine for a quality name.
|
## Determine the quality and quality changes settings for the current machine for a quality name.
|
||||||
#
|
#
|
||||||
# \param quality_name \type{str} the name of the quality.
|
# \param quality_name \type{str} the name of the quality.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue