mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-20 13:17:51 -06: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
1 changed files with 3 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue