|
@@ -100,13 +100,6 @@ class CloudOutputDeviceManager:
|
|
|
new_clusters = []
|
|
|
online_clusters = {c.cluster_id: c for c in clusters if c.is_online} # type: Dict[str, CloudClusterResponse]
|
|
|
|
|
|
- # If the user signs in from the welcome dialog, then we will search for cloud printers and if any of them are
|
|
|
- # found, the welcome screen will close. This way we avoid prompting the user to add printers if he/she already
|
|
|
- # has cloud printers
|
|
|
- welcome_pages_model = CuraApplication.getInstance().getWelcomePagesModel()
|
|
|
- cloud_page_idx = welcome_pages_model.getPageIndexById("cloud") + 1
|
|
|
- if welcome_pages_model.currentPageIndex == cloud_page_idx and len(online_clusters) > 0:
|
|
|
- welcome_pages_model.atEnd()
|
|
|
for device_id, cluster_data in online_clusters.items():
|
|
|
if device_id not in self._remote_clusters:
|
|
|
new_clusters.append(cluster_data)
|
|
@@ -115,6 +108,10 @@ class CloudOutputDeviceManager:
|
|
|
|
|
|
self._onDevicesDiscovered(new_clusters)
|
|
|
|
|
|
+ # Inform whether new cloud printers have been detected. If they have, the welcome wizard can close.
|
|
|
+ self._account._new_cloud_printers_detected = len(new_clusters) > 0
|
|
|
+ self._account.cloudPrintersDetectedChanged.emit(len(new_clusters) > 0)
|
|
|
+
|
|
|
removed_device_keys = set(self._remote_clusters.keys()) - set(online_clusters.keys())
|
|
|
for device_id in removed_device_keys:
|
|
|
self._onDiscoveredDeviceRemoved(device_id)
|