mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 16:08:58 +08:00
Merge pull request #6437 from Ultimaker/CS-328_improvements
CS-328 improvements
This commit is contained in:
commit
93f2641be7
@ -98,6 +98,13 @@ class LocalClusterOutputDeviceManager:
|
|||||||
self._connectToOutputDevice(device, active_machine)
|
self._connectToOutputDevice(device, active_machine)
|
||||||
self._connectToActiveMachine()
|
self._connectToActiveMachine()
|
||||||
|
|
||||||
|
# Pre-select the correct machine type of the group host.
|
||||||
|
# We first need to find the correct definition because the machine manager only takes name as input, not ID.
|
||||||
|
definitions = CuraApplication.getInstance().getContainerRegistry().findContainers(id = device.printerType)
|
||||||
|
if not definitions:
|
||||||
|
return
|
||||||
|
CuraApplication.getInstance().getMachineManager().switchPrinterType(definitions[0].getName())
|
||||||
|
|
||||||
## Callback for when the active machine was changed by the user or a new remote cluster was found.
|
## Callback for when the active machine was changed by the user or a new remote cluster was found.
|
||||||
def _connectToActiveMachine(self) -> None:
|
def _connectToActiveMachine(self) -> None:
|
||||||
active_machine = CuraApplication.getInstance().getGlobalContainerStack()
|
active_machine = CuraApplication.getInstance().getGlobalContainerStack()
|
||||||
@ -250,13 +257,6 @@ class LocalClusterOutputDeviceManager:
|
|||||||
if device.key not in output_device_manager.getOutputDeviceIds():
|
if device.key not in output_device_manager.getOutputDeviceIds():
|
||||||
output_device_manager.addOutputDevice(device)
|
output_device_manager.addOutputDevice(device)
|
||||||
|
|
||||||
# Pre-select the correct machine type of the group host.
|
|
||||||
# We first need to find the correct definition because the machine manager only takes name as input, not ID.
|
|
||||||
definitions = CuraApplication.getInstance().getContainerRegistry().findContainers(id=device.printerType)
|
|
||||||
if not definitions:
|
|
||||||
return
|
|
||||||
CuraApplication.getInstance().getMachineManager().switchPrinterType(definitions[0].getName())
|
|
||||||
|
|
||||||
## Nudge the user to start using Ultimaker Cloud.
|
## Nudge the user to start using Ultimaker Cloud.
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _showCloudFlowMessage(device: LocalClusterOutputDevice) -> None:
|
def _showCloudFlowMessage(device: LocalClusterOutputDevice) -> None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user