Pass output device (or not) to cloud check method

Contributes to CL-1325
This commit is contained in:
Ian Paschal 2019-04-10 15:43:44 +02:00
parent 7d644c0d1a
commit 61c38c5ec0

View file

@ -181,7 +181,7 @@ class UM3OutputDevicePlugin(OutputDevicePlugin):
um_network_key = CuraApplication.getInstance().getGlobalContainerStack().getMetaDataEntry("um_network_key") um_network_key = CuraApplication.getInstance().getGlobalContainerStack().getMetaDataEntry("um_network_key")
if key == um_network_key: if key == um_network_key:
self.getOutputDeviceManager().addOutputDevice(self._discovered_devices[key]) self.getOutputDeviceManager().addOutputDevice(self._discovered_devices[key])
self.checkCloudFlowIsPossible() self.checkCloudFlowIsPossible(None)
else: else:
self.getOutputDeviceManager().removeOutputDevice(key) self.getOutputDeviceManager().removeOutputDevice(key)
if key.startswith("manual:"): if key.startswith("manual:"):
@ -488,7 +488,7 @@ class UM3OutputDevicePlugin(OutputDevicePlugin):
return True return True
## Check if the prerequsites are in place to start the cloud flow ## Check if the prerequsites are in place to start the cloud flow
def checkCloudFlowIsPossible(self) -> None: def checkCloudFlowIsPossible(self, cluster: Optional["CloudOutputDevice"]) -> None:
Logger.log("d", "Checking if cloud connection is possible...") Logger.log("d", "Checking if cloud connection is possible...")
# Pre-Check: Skip if active machine already has been cloud connected or you said don't ask again # Pre-Check: Skip if active machine already has been cloud connected or you said don't ask again
@ -595,7 +595,7 @@ class UM3OutputDevicePlugin(OutputDevicePlugin):
self._cloud_flow_complete_message.hide() self._cloud_flow_complete_message.hide()
# Check for cloud flow again with newly selected machine # Check for cloud flow again with newly selected machine
self.checkCloudFlowIsPossible() self.checkCloudFlowIsPossible(None)
def _createCloudFlowStartMessage(self): def _createCloudFlowStartMessage(self):
self._start_cloud_flow_message = Message( self._start_cloud_flow_message = Message(