Remove code duplication in createAbstractMachine

This also caused a crash when an abstract machine with multiple extruders was selected

CURA-8463
This commit is contained in:
Jaime van Kessel 2022-08-26 14:08:03 +02:00
parent 46532828a4
commit 506f2b9820
No known key found for this signature in database
GPG key ID: C85F7A3AF1BAA7C4
3 changed files with 18 additions and 33 deletions

View file

@ -81,7 +81,8 @@ class MachineListModel(ListModel):
for stack in online_machine_stacks:
self.addItem(stack)
# Remove this machine from the other stack list
other_machine_stacks.remove(stack)
if stack in other_machine_stacks:
other_machine_stacks.remove(stack)
for stack in other_machine_stacks:
self.addItem(stack)