Reslice when per-object extruder changes

Not when you activate the dropdown but it doesn't change though.

Contributes to issue CURA-340.
This commit is contained in:
Ghostkeeper 2016-06-10 13:37:07 +02:00
parent df1ca39c7b
commit f302e06654
No known key found for this signature in database
GPG key ID: 701948C5954A7385

View file

@ -61,7 +61,10 @@ class SettingOverrideDecorator(SceneNodeDecorator):
if self._extruder_stack:
extruder_stack = ContainerRegistry.getInstance().findContainerStacks(id = self._extruder_stack)
if extruder_stack:
old_extruder_stack_id = self._stack.getNextStack().getId()
self._stack.setNextStack(extruder_stack[0])
if self._stack.getNextStack().getId() != old_extruder_stack_id: #Only reslice if the extruder changed.
Application.getInstance().getBackend().forceSlice()
else:
UM.Logger.log("e", "Extruder stack %s below per-object settings does not exist.", self._extruder_stack)
else: