From 21545af5c8eb425faee88caf1ca703ea8ea9ef1a Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 8 Jun 2016 11:10:41 +0200 Subject: [PATCH] Get only values from extruder trains dictionary Instead of getting the keys, which are labeled '0' and '1', we'd like to get the values, which are the extruder train IDs themselves. Contributes to issues CURA-340 and CURA-1278. --- cura/ExtruderManager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/ExtruderManager.py b/cura/ExtruderManager.py index 3be0694440..8219066eca 100644 --- a/cura/ExtruderManager.py +++ b/cura/ExtruderManager.py @@ -165,7 +165,7 @@ class ExtruderManager(QObject): if not machine_id in self._extruder_trains: UM.Logger.log("w", "Tried to get the extruder trains for machine %s, which doesn't exist.", machine_id) return - for extruder_train_id in self._extruder_trains[machine_id]: + for _,extruder_train_id in self._extruder_trains[machine_id].items(): extruder_train = container_registry.findContainerStacks(id = extruder_train_id) if extruder_train: yield extruder_train[0]