Fix the case when active_extruder is None

This commit is contained in:
Lipu Fei 2017-10-09 14:34:53 +02:00
parent 14936f7999
commit 1c5d352b88
2 changed files with 8 additions and 2 deletions

View file

@ -41,6 +41,9 @@ class QualityAndUserProfilesModel(ProfilesModel):
new_extruder_stacks = []
if active_extruder is not None:
new_extruder_stacks = [active_extruder]
else:
# if there is no active extruder, use the first one in the active extruder stacks
active_extruder = extruder_stacks[0]
extruder_stacks = new_extruder_stacks + extruder_stacks
# Fetch the list of useable qualities across all extruders.