mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-07-06 19:55:11 +08:00
Merge branch 'main' into CURA-7913
This commit is contained in:
commit
cc1b42e2fa
@ -110,22 +110,22 @@ class MachineListModel(ListModel):
|
|||||||
|
|
||||||
for abstract_machine in abstract_machine_stacks:
|
for abstract_machine in abstract_machine_stacks:
|
||||||
definition_id = abstract_machine.definition.getId()
|
definition_id = abstract_machine.definition.getId()
|
||||||
online_machine_stacks = machines_manager.getMachinesWithDefinition(definition_id, online_only = True)
|
connected_machine_stacks = machines_manager.getMachinesWithDefinition(definition_id, online_only = False)
|
||||||
|
|
||||||
online_machine_stacks = list(filter(lambda machine: machine.hasNetworkedConnection(), online_machine_stacks))
|
connected_machine_stacks = list(filter(lambda machine: machine.hasNetworkedConnection(), connected_machine_stacks))
|
||||||
online_machine_stacks.sort(key=lambda machine: machine.getName().upper())
|
connected_machine_stacks.sort(key=lambda machine: machine.getName().upper())
|
||||||
|
|
||||||
if abstract_machine in other_machine_stacks:
|
if abstract_machine in other_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 connected_machine_stacks:
|
||||||
online_machine_stacks.remove(abstract_machine)
|
connected_machine_stacks.remove(abstract_machine)
|
||||||
|
|
||||||
# Create a list item for abstract machine
|
# Create a list item for abstract machine
|
||||||
self.addItem(abstract_machine, True, len(online_machine_stacks))
|
self.addItem(abstract_machine, True, len(connected_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 connected_machine_stacks:
|
||||||
if self._show_cloud_printers:
|
if self._show_cloud_printers:
|
||||||
self.addItem(stack, True)
|
self.addItem(stack, True)
|
||||||
# Remove this machine from the other stack list
|
# Remove this machine from the other stack list
|
||||||
|
@ -280,7 +280,7 @@ Window
|
|||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
marketplaceDialog.hide();
|
marketplaceDialog.hide();
|
||||||
CuraApplication.closeApplication();
|
CuraApplication.checkAndExitApplication();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user