Fixed issue where changing a setting would cause mismatch between stacks

CURA-1758
This commit is contained in:
Jaime van Kessel 2016-07-25 09:58:33 +02:00
parent be252fb84f
commit 000c4d5f41

View file

@ -246,11 +246,16 @@ class MachineManager(QObject):
if len(containers) > 1: if len(containers) > 1:
for index in range(1, len(containers)): for index in range(1, len(containers)):
deeper_container = containers[index] deeper_container = containers[index]
if deeper_container.getProperty(key, "value") is None:
continue # Deeper container does not have the value, so continue.
if deeper_container.getProperty(key, "value") == new_value: if deeper_container.getProperty(key, "value") == new_value:
# Removal will result in correct value, so do that. # Removal will result in correct value, so do that.
# We do this to prevent the reset from showing up unneeded. # We do this to prevent the reset from showing up unneeded.
instance_needs_removal = True instance_needs_removal = True
break break
else:
# Container has the value, but it's not the same. Stop looking.
break
if instance_needs_removal: if instance_needs_removal:
extruder_stack.getTop().removeInstance(key) extruder_stack.getTop().removeInstance(key)
else: else: