Ensure pop-up is not shown if cloud connection is already configured

Contributes to CL-1222
This commit is contained in:
Ian Paschal 2019-02-11 10:21:54 +01:00
parent 937dce591d
commit 0e913044de

View file

@ -412,10 +412,15 @@ class UM3OutputDevicePlugin(OutputDevicePlugin):
active_machine = self._application.getMachineManager().activeMachine # type: Optional["GlobalStack"]
if active_machine:
# Check 1: Printer isn't already configured for cloud
# Check 1A: Printer isn't already configured for cloud
if ConnectionType.CloudConnection.value in active_machine.configuredConnectionTypes:
Logger.log("d", "Active machine was already configured for cloud.")
return
# Check 1B: Printer isn't already configured for cloud
if active_machine.getMetaDataEntry("cloud_flow_complete", "value") is True:
Logger.log("d", "Active machine was already configured for cloud.")
return
# Check 2: User did not already say "Don't ask me again"
if active_machine.getMetaDataEntry("show_cloud_message", "value") is False: