diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 1fcb42e824..e84f8d2237 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -396,18 +396,23 @@ class MachineManager(QObject): return False if self._global_container_stack.hasErrors(): + Logger.log("d", "Checking global stack for errors took %0.2f s and we found and error" % (time.time() - time_start)) return True # Not a very pretty solution, but the extruder manager doesn't really know how many extruders there are machine_extruder_count = self._global_container_stack.getProperty("machine_extruder_count", "value") extruder_stacks = ExtruderManager.getInstance().getMachineExtruders(self._global_container_stack.getId()) - if len(extruder_stacks) > machine_extruder_count: - extruder_stacks = extruder_stacks[:machine_extruder_count] # we only have to check the used extruders + count = 1 # we start with the global stack for stack in extruder_stacks: + md = stack.getMetaData() + if "position" in md and int(md["position"]) >= machine_extruder_count: + continue + count += 1 if stack.hasErrors(): + Logger.log("d", "Checking %s stacks for errors took %.2f s and we found an error in stack [%s]" % (count, time.time() - time_start, str(stack))) return True - Logger.log("d", "Checking stacks for errors took %.2f s" % (time.time() - time_start)) + Logger.log("d", "Checking %s stacks for errors took %.2f s" % (count, time.time() - time_start)) return False ## Remove all instances from the top instanceContainer (effectively removing all user-changed settings)