Browse Source

Check for internet when determining connection status

CURA-7437
Nino van Hooff 4 years ago
parent
commit
8c28dd8d84
1 changed files with 6 additions and 2 deletions
  1. 6 2
      resources/qml/PrinterSelector/MachineSelector.qml

+ 6 - 2
resources/qml/PrinterSelector/MachineSelector.qml

@@ -21,7 +21,7 @@ Cura.ExpandablePopup
         {
             return "printer_connected"
         }
-        else if (isConnectedCloudPrinter)
+        else if (isConnectedCloudPrinter && Cura.API.connectionStatus.isInternetReachable)
         {
             return "printer_cloud_connected"
         }
@@ -38,7 +38,11 @@ Cura.ExpandablePopup
     readonly property string connectionStatusMessage: {
         if (connectionStatus == "printer_cloud_not_available")
         {
-            return "The cloud connection is currently unavailable. Please check your internet connection and sign in to connect to the cloud printer"
+            if(Cura.API.connectionStatus.isInternetReachable){
+                return catalog.i18nc("@status", "The cloud connection is currently unavailable. Please check your internet connection and sign in to connect to the cloud printer.")
+            } else {
+                return catalog.i18nc("@status", "The cloud connection is currently unavailable. Please check your internet connection.")
+            }
         } else {
             return ""
         }