mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -06:00
Fix is_online logic
This commit is contained in:
parent
b50e942768
commit
1bcabc6f42
1 changed files with 2 additions and 3 deletions
|
@ -87,6 +87,7 @@ class CloudOutputDeviceManager(NetworkClient):
|
||||||
found_cluster_ids = set(found_clusters.keys())
|
found_cluster_ids = set(found_clusters.keys())
|
||||||
|
|
||||||
# Add an output device for each new remote cluster.
|
# Add an output device for each new remote cluster.
|
||||||
|
# We only add when is_online as we don't want the option in the drop down if the cluster is not online.
|
||||||
for cluster_id in found_cluster_ids.difference(known_cluster_ids):
|
for cluster_id in found_cluster_ids.difference(known_cluster_ids):
|
||||||
if found_clusters[cluster_id].is_online:
|
if found_clusters[cluster_id].is_online:
|
||||||
self._addCloudOutputDevice(found_clusters[cluster_id])
|
self._addCloudOutputDevice(found_clusters[cluster_id])
|
||||||
|
@ -113,9 +114,7 @@ class CloudOutputDeviceManager(NetworkClient):
|
||||||
device = CloudOutputDevice(cluster.cluster_id)
|
device = CloudOutputDevice(cluster.cluster_id)
|
||||||
self._output_device_manager.addOutputDevice(device)
|
self._output_device_manager.addOutputDevice(device)
|
||||||
self._remote_clusters[cluster.cluster_id] = device
|
self._remote_clusters[cluster.cluster_id] = device
|
||||||
if cluster.is_online:
|
self._connectToActiveMachine()
|
||||||
# We found a new online cluster, we might need to connect to it.
|
|
||||||
self._connectToActiveMachine()
|
|
||||||
|
|
||||||
## Remove a CloudOutputDevice
|
## Remove a CloudOutputDevice
|
||||||
def _removeCloudOutputDevice(self, cluster: CloudCluster):
|
def _removeCloudOutputDevice(self, cluster: CloudCluster):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue