Browse Source

Hide gradual infill checkbox if the gradual infill steps setting is disabled

fieldOfView 7 years ago
parent
commit
0b03681890
1 changed files with 3 additions and 2 deletions
  1. 3 2
      resources/qml/SidebarSimple.qml

+ 3 - 2
resources/qml/SidebarSimple.qml

@@ -360,7 +360,7 @@ Item
             {
             {
                 id: infillCellRight
                 id: infillCellRight
 
 
-                height: infillSlider.height + enableGradualInfillCheckBox.height + (UM.Theme.getSize("sidebar_margin").height * 2)
+                height: infillSlider.height + UM.Theme.getSize("sidebar_margin").height + enableGradualInfillCheckBox.visible * (enableGradualInfillCheckBox.height + UM.Theme.getSize("sidebar_margin").height)
                 width: UM.Theme.getSize("sidebar").width * .55
                 width: UM.Theme.getSize("sidebar").width * .55
 
 
                 anchors.left: infillCellLeft.right
                 anchors.left: infillCellLeft.right
@@ -510,6 +510,7 @@ Item
 
 
                     style: UM.Theme.styles.checkbox
                     style: UM.Theme.styles.checkbox
                     enabled: base.settingsEnabled
                     enabled: base.settingsEnabled
+                    visible: infillSteps.properties.enabled == "True"
                     checked: parseInt(infillSteps.properties.value) > 0
                     checked: parseInt(infillSteps.properties.value) > 0
 
 
                     MouseArea {
                     MouseArea {
@@ -849,7 +850,7 @@ Item
                 id: infillSteps
                 id: infillSteps
                 containerStackId: Cura.MachineManager.activeStackId
                 containerStackId: Cura.MachineManager.activeStackId
                 key: "gradual_infill_steps"
                 key: "gradual_infill_steps"
-                watchedProperties: ["value"]
+                watchedProperties: ["value", "enabled"]
                 storeIndex: 0
                 storeIndex: 0
             }
             }