mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 17:27:51 -06:00
Merge branch '4.0'
This commit is contained in:
commit
e7d2400199
14 changed files with 42 additions and 37 deletions
|
@ -355,8 +355,8 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
|
|||
def sendJobToTop(self, print_job_uuid: str) -> None:
|
||||
# This function is part of the output device (and not of the printjob output model) as this type of operation
|
||||
# is a modification of the cluster queue and not of the actual job.
|
||||
data = "{\"to_position\": 0}"
|
||||
self.put("print_jobs/{uuid}/move_to_position".format(uuid = print_job_uuid), data, on_finished=None)
|
||||
data = "{\"list\": \"queued\",\"to_position\": 0}"
|
||||
self.post("print_jobs/{uuid}/action/move".format(uuid = print_job_uuid), data, on_finished=None)
|
||||
|
||||
@pyqtSlot(str)
|
||||
def deleteJobFromQueue(self, print_job_uuid: str) -> None:
|
||||
|
|
|
@ -106,13 +106,13 @@ class DiscoverUM3Action(MachineAction):
|
|||
global_container_stack = CuraApplication.getInstance().getGlobalContainerStack()
|
||||
if global_container_stack:
|
||||
meta_data = global_container_stack.getMetaData()
|
||||
if "connect_group_name" in meta_data:
|
||||
previous_connect_group_name = meta_data["connect_group_name"]
|
||||
global_container_stack.setMetaDataEntry("connect_group_name", group_name)
|
||||
if "group_name" in meta_data:
|
||||
previous_connect_group_name = meta_data["group_name"]
|
||||
global_container_stack.setMetaDataEntry("group_name", group_name)
|
||||
# Find all the places where there is the same group name and change it accordingly
|
||||
CuraApplication.getInstance().getMachineManager().replaceContainersMetadata(key = "connect_group_name", value = previous_connect_group_name, new_value = group_name)
|
||||
CuraApplication.getInstance().getMachineManager().replaceContainersMetadata(key = "group_name", value = previous_connect_group_name, new_value = group_name)
|
||||
else:
|
||||
global_container_stack.setMetaDataEntry("connect_group_name", group_name)
|
||||
global_container_stack.setMetaDataEntry("group_name", group_name)
|
||||
# Set the default value for "hidden", which is used when you have a group with multiple types of printers
|
||||
global_container_stack.setMetaDataEntry("hidden", False)
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2018 Ultimaker B.V.
|
||||
# Copyright (c) 2019 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
import json
|
||||
from queue import Queue
|
||||
|
@ -245,7 +245,7 @@ class UM3OutputDevicePlugin(OutputDevicePlugin):
|
|||
properties = device.getProperties().copy()
|
||||
if b"incomplete" in properties:
|
||||
del properties[b"incomplete"]
|
||||
properties[b'cluster_size'] = len(cluster_printers_list)
|
||||
properties[b"cluster_size"] = len(cluster_printers_list)
|
||||
self._onRemoveDevice(instance_name)
|
||||
self._onAddDevice(instance_name, address, properties)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue