mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
STAR-322: Removing devices when logging off
This commit is contained in:
parent
657e763318
commit
117cf10a2c
2 changed files with 7 additions and 1 deletions
|
@ -62,6 +62,10 @@ class CloudOutputDeviceManager:
|
|||
# The first call to _getRemoteClusters comes from self._account.loginStateChanged
|
||||
if not self._update_timer.isActive():
|
||||
self._update_timer.start()
|
||||
else:
|
||||
self._onGetRemoteClustersFinished([])
|
||||
if self._update_timer.isActive():
|
||||
self._update_timer.stop()
|
||||
|
||||
## Callback for when the request for getting the clusters. is finished.
|
||||
def _onGetRemoteClustersFinished(self, clusters: List[CloudCluster]) -> None:
|
||||
|
@ -73,6 +77,8 @@ class CloudOutputDeviceManager:
|
|||
|
||||
# Remove output devices that are gone
|
||||
for removed_cluster in removed_devices:
|
||||
if removed_cluster.isConnected():
|
||||
removed_cluster.disconnect()
|
||||
self._output_device_manager.removeOutputDevice(removed_cluster.key)
|
||||
del self._remote_clusters[removed_cluster.key]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue