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.
This commit is contained in:
Ghostkeeper 2016-06-08 11:10:41 +02:00
parent 91797c3944
commit 21545af5c8
No known key found for this signature in database
GPG key ID: 701948C5954A7385

View file

@ -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]