Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime van Kessel <nallath@gmail.com>2022-08-31 16:12:25 +0300
committerJaime van Kessel <nallath@gmail.com>2022-08-31 16:12:25 +0300
commitded387324985b52632cab5eaa1343e6e239fcb1c (patch)
treee7832bfea675c98966e7f3667e99b57a3b7cecbd /cura/Machines
parenta713b1e9e979dc4e1817e43ab7a6f2a13ee3da39 (diff)
Fix abstract machines being displayed twice
Diffstat (limited to 'cura/Machines')
-rw-r--r--cura/Machines/Models/MachineListModel.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cura/Machines/Models/MachineListModel.py b/cura/Machines/Models/MachineListModel.py
index 2dbf088088..55db072180 100644
--- a/cura/Machines/Models/MachineListModel.py
+++ b/cura/Machines/Models/MachineListModel.py
@@ -83,7 +83,6 @@ class MachineListModel(ListModel):
abstract_machine_stacks = CuraContainerRegistry.getInstance().findContainerStacks(is_abstract_machine = "True")
abstract_machine_stacks.sort(key = lambda machine: machine.getName(), reverse = True)
-
for abstract_machine in abstract_machine_stacks:
definition_id = abstract_machine.definition.getId()
from cura.CuraApplication import CuraApplication
@@ -93,6 +92,8 @@ class MachineListModel(ListModel):
# Create a list item for abstract machine
self.addItem(abstract_machine, len(online_machine_stacks))
other_machine_stacks.remove(abstract_machine)
+ if abstract_machine in online_machine_stacks:
+ online_machine_stacks.remove(abstract_machine)
# Create list of machines that are children of the abstract machine
for stack in online_machine_stacks: