mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 01:09:00 +08:00
Don't crash if the number of extruders in setting doesn't match
...with the actual number of extruders. These could misalign with Custom FDM Printer or when any of the extruders was deleted because of a configuration format error. Contributes to issue #3570.
This commit is contained in:
parent
585888f84a
commit
1af56871e2
@ -163,7 +163,7 @@ class QualityManager(QObject):
|
|||||||
def _updateQualityGroupsAvailability(self, machine: "GlobalStack", quality_group_list):
|
def _updateQualityGroupsAvailability(self, machine: "GlobalStack", quality_group_list):
|
||||||
used_extruders = set()
|
used_extruders = set()
|
||||||
for i in range(machine.getProperty("machine_extruder_count", "value")):
|
for i in range(machine.getProperty("machine_extruder_count", "value")):
|
||||||
if machine.extruders[str(i)].isEnabled:
|
if str(i) in machine.extruders and machine.extruders[str(i)].isEnabled:
|
||||||
used_extruders.add(str(i))
|
used_extruders.add(str(i))
|
||||||
|
|
||||||
# Update the "is_available" flag for each quality group.
|
# Update the "is_available" flag for each quality group.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user