mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-27 21:01:11 -07:00
Fix call to findContainerStack[s]
Was a typo. Now it also checks if the stack ID is correct here. Not because it went wrong, but for defensive programming. Contributes to issue CURA-340.
This commit is contained in:
parent
f5f711b7dc
commit
9e86cd5c85
1 changed files with 6 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ from UM.Signal import Signal, signalemitter
|
||||||
from UM.Settings.ContainerStack import ContainerStack
|
from UM.Settings.ContainerStack import ContainerStack
|
||||||
from UM.Settings.InstanceContainer import InstanceContainer
|
from UM.Settings.InstanceContainer import InstanceContainer
|
||||||
from UM.Settings.ContainerRegistry import ContainerRegistry
|
from UM.Settings.ContainerRegistry import ContainerRegistry
|
||||||
|
import UM.Logger
|
||||||
|
|
||||||
from UM.Application import Application
|
from UM.Application import Application
|
||||||
|
|
||||||
|
|
@ -58,7 +59,11 @@ class SettingOverrideDecorator(SceneNodeDecorator):
|
||||||
# kept up to date.
|
# kept up to date.
|
||||||
def _updateNextStack(self):
|
def _updateNextStack(self):
|
||||||
if self._extruder_stack:
|
if self._extruder_stack:
|
||||||
self._stack.setNextStack(ContainerRegistry.getInstance().findContainerStack(id = self._extruder_stack))
|
extruder_stack = ContainerRegistry.getInstance().findContainerStacks(id = self._extruder_stack)
|
||||||
|
if extruder_stack:
|
||||||
|
self._stack.setNextStack(extruder_stack)
|
||||||
|
else:
|
||||||
|
UM.Logger.log("e", "Extruder stack %s below per-object settings does not exist.", self._extruder_stack)
|
||||||
else:
|
else:
|
||||||
self._stack.setNextStack(Application.getInstance().getGlobalContainerStack())
|
self._stack.setNextStack(Application.getInstance().getGlobalContainerStack())
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue