mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 17:05:54 +08:00
Update the DiscoveredCloudUltimakerPrinters model
Whenever new cloud devices are detected on the ultimaker account, add them to the model CURA-7022
This commit is contained in:
parent
c8e86175cd
commit
49cb1d325e
@ -141,10 +141,13 @@ class CloudOutputDeviceManager:
|
||||
if machine_manager.getMachine(device.printerType, {self.META_CLUSTER_ID: device.key}) is None \
|
||||
and machine_manager.getMachine(device.printerType, {self.META_NETWORK_KEY: cluster_data.host_name + "*"}) is None: # The host name is part of the network key.
|
||||
new_devices.append(device)
|
||||
|
||||
elif device.getId() not in self._remote_clusters:
|
||||
self._remote_clusters[device.getId()] = device
|
||||
remote_clusters_added = True
|
||||
|
||||
CuraApplication.getInstance().getDiscoveredUltimakerCloudPrintersModel().addDiscoveredUltimakerCloudPrinter(new_devices)
|
||||
|
||||
if not new_devices:
|
||||
if remote_clusters_added:
|
||||
self._connectToActiveMachine()
|
||||
|
Loading…
x
Reference in New Issue
Block a user