mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-06 20:09:00 +08:00

When a cloud printer is no longer received from mycloud, it is safe to assume that the printer is removed from the account. In such a case, the new function _devicesRemovedFromAccount(..) will retrieve all the devices that are to be removed (i.e. they are added in Cura but they do not exist in the clusters received from mycloud) and will remove their output device. In addition the function will generate a message that mentions all the devices that were no longer linked to the account. In order to achieve that, the Cloud/CloudOutputDeviceManager is enriched with the dictionary self._um_cloud_printers that contains all the currently existing cloud-enabled devices that were previously added in Cura. In addition, the meta-data field "removed_from_account" is added to all the cloud-enabled Cura devices to distinguish the ones actually linked to the current account. With these additions, the cloud devices that are removed from the account will be automagically re-linked to it once the devices are once again retrieved from mycloud for the specific account. CURA-7438