Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorc.lamboo <casperlamboo@gmail.com>2022-09-06 14:52:10 +0300
committerc.lamboo <casperlamboo@gmail.com>2022-09-06 14:52:10 +0300
commit148263a06828e6b5669854a6f0feacba7d4bc2ce (patch)
tree9e74e95650e929f740d60a1a1e034d96cb1186b8 /cura/Settings
parent6253fb2fdc1340a0c457771c7eb6b44f081a5215 (diff)
Move `hasNetworkedConnection` to `GlobalStack`
From code review CURA-9277 Co-authored-by: Joey <j.delarago@ultimaker.com>
Diffstat (limited to 'cura/Settings')
-rwxr-xr-xcura/Settings/GlobalStack.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/cura/Settings/GlobalStack.py b/cura/Settings/GlobalStack.py
index b94ca45763..041bd19d3a 100755
--- a/cura/Settings/GlobalStack.py
+++ b/cura/Settings/GlobalStack.py
@@ -347,6 +347,12 @@ class GlobalStack(CuraContainerStack):
nameChanged = pyqtSignal()
name = pyqtProperty(str, fget=getName, fset=setName, notify=nameChanged)
+ def hasNetworkedConnection(self) -> bool:
+ has_connection = False
+ for connection_type in [ConnectionType.NetworkConnection.value, ConnectionType.CloudConnection.value]:
+ has_connection |= connection_type in self.configuredConnectionTypes
+ return has_connection
+
## private:
global_stack_mime = MimeType(
name = "application/x-cura-globalstack",