mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-16 11:35:55 +08:00
Always show correct number of connected machines
Calculate number of connected machines _after_ the abstract machine its connected is removed from the list CURA-9277
This commit is contained in:
parent
27fc11b840
commit
6d0acbe095
@ -89,12 +89,13 @@ class MachineListModel(ListModel):
|
|||||||
machines_manager = CuraApplication.getInstance().getMachineManager()
|
machines_manager = CuraApplication.getInstance().getMachineManager()
|
||||||
online_machine_stacks = machines_manager.getMachinesWithDefinition(definition_id, online_only = True)
|
online_machine_stacks = machines_manager.getMachinesWithDefinition(definition_id, online_only = True)
|
||||||
|
|
||||||
# Create a list item for abstract machine
|
|
||||||
self.addItem(abstract_machine, len(online_machine_stacks))
|
|
||||||
other_machine_stacks.remove(abstract_machine)
|
other_machine_stacks.remove(abstract_machine)
|
||||||
if abstract_machine in online_machine_stacks:
|
if abstract_machine in online_machine_stacks:
|
||||||
online_machine_stacks.remove(abstract_machine)
|
online_machine_stacks.remove(abstract_machine)
|
||||||
|
|
||||||
|
# Create a list item for abstract machine
|
||||||
|
self.addItem(abstract_machine, len(online_machine_stacks))
|
||||||
|
|
||||||
# Create list of machines that are children of the abstract machine
|
# Create list of machines that are children of the abstract machine
|
||||||
for stack in online_machine_stacks:
|
for stack in online_machine_stacks:
|
||||||
if self._show_cloud_printers:
|
if self._show_cloud_printers:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user