Remove use of deprecated extruders property

This commit is contained in:
Jaime van Kessel 2019-09-13 14:11:55 +02:00
parent 495ed17294
commit 0ff9d72c4c
No known key found for this signature in database
GPG key ID: 3710727397403C91
15 changed files with 111 additions and 90 deletions

View file

@ -154,8 +154,13 @@ class QualityManager(QObject):
def _updateQualityGroupsAvailability(self, machine: "GlobalStack", quality_group_list) -> None:
used_extruders = set()
for i in range(machine.getProperty("machine_extruder_count", "value")):
if str(i) in machine.extruders and machine.extruders[str(i)].isEnabled:
used_extruders.add(str(i))
try:
extruder = machine.extruderList[int(i)]
except IndexError:
pass
else:
if extruder.isEnabled:
used_extruders.add(str(i))
# Update the "is_available" flag for each quality group.
for quality_group in quality_group_list: