Browse Source

CURA-4870 Hide the configuration selector if the connection is lost.

Diego Prado Gesto 7 years ago
parent
commit
747efda52b
2 changed files with 9 additions and 10 deletions
  1. 8 9
      resources/qml/Menus/ConfigurationMenu/SyncButton.qml
  2. 1 1
      resources/qml/Sidebar.qml

+ 8 - 9
resources/qml/Menus/ConfigurationMenu/SyncButton.qml

@@ -68,7 +68,8 @@ Button
                 color: UM.Theme.getColor("text_emphasis")
                 source: UM.Theme.getIcon("arrow_bottom")
             }
-            UM.RecolorImage {
+            UM.RecolorImage
+            {
                 id: sidebarComboBoxLabel
                 anchors.left: parent.left
                 anchors.leftMargin: UM.Theme.getSize("default_margin").width
@@ -86,17 +87,15 @@ Button
         label: Label {}
     }
 
-    Connections {
+    Connections
+    {
         target: outputDevice
-        onUniqueConfigurationsChanged: {
-            updateOnSync()
-        }
+        onUniqueConfigurationsChanged: updateOnSync()
     }
 
-    Connections {
+    Connections
+    {
         target: Cura.MachineManager
-        onCurrentConfigurationChanged: {
-            updateOnSync()
-        }
+        onCurrentConfigurationChanged: updateOnSync()
     }
 }

+ 1 - 1
resources/qml/Sidebar.qml

@@ -109,7 +109,7 @@ Rectangle
     ConfigurationSelection
     {
         id: configSelection
-        visible: isNetworkPrinter
+        visible: isNetworkPrinter && printerConnected
         width: visible ? Math.round(base.width * 0.15) : 0
         height: UM.Theme.getSize("sidebar_header").height
         anchors.top: base.top