mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-13 11:13:16 +08:00
Merge pull request #5606 from Ultimaker/CL-1325_pass_output_device_to_cloud_check
CL-1325 Pass output device (or not) to cloud check method
This commit is contained in:
commit
474aff2d4a
@ -27,6 +27,7 @@ from UM.Version import Version
|
|||||||
|
|
||||||
from . import ClusterUM3OutputDevice, LegacyUM3OutputDevice
|
from . import ClusterUM3OutputDevice, LegacyUM3OutputDevice
|
||||||
from .Cloud.CloudOutputDeviceManager import CloudOutputDeviceManager
|
from .Cloud.CloudOutputDeviceManager import CloudOutputDeviceManager
|
||||||
|
from .Cloud.CloudOutputDevice import CloudOutputDevice # typing
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from PyQt5.QtNetwork import QNetworkReply
|
from PyQt5.QtNetwork import QNetworkReply
|
||||||
@ -181,7 +182,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 +489,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 +596,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(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user