Fix check if machine's extruders are processed

Luckily this did never occur anyway since the rest of the code was sound.

Contributes to issue CURA-340.
This commit is contained in:
Ghostkeeper 2016-06-09 16:43:53 +02:00
parent 9d618282ed
commit 9f3752276f
No known key found for this signature in database
GPG Key ID: 701948C5954A7385

View File

@ -191,9 +191,10 @@ class ExtruderManager(QObject):
container_registry.addContainer(container_stack) container_registry.addContainer(container_stack)
## Generates extruders for a specific machine. ## Generates extruders for a specific machine.
#
# \param machine_id The machine to get the extruders of.
def getMachineExtruders(self, machine_id): def getMachineExtruders(self, machine_id):
container_registry = UM.Settings.ContainerRegistry.getInstance() if machine_id not in self._extruder_trains:
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) UM.Logger.log("w", "Tried to get the extruder trains for machine %s, which doesn't exist.", machine_id)
return return
for name in self._extruder_trains[machine_id]: for name in self._extruder_trains[machine_id]: