Skip to content

Commit 84e475f

Browse files
committed
Simplify extruder configuration visible logic
1 parent 42ff080 commit 84e475f

1 file changed

Lines changed: 8 additions & 17 deletions

File tree

resources/qml/SidebarContents.qml

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,14 @@ Cura.RoundedRectangle
105105
Item
106106
{
107107
id: extruderConfiguration
108-
visible: UM.Preferences.getValue("sidebargui/expand_extruder_configuration")
108+
visible:
109+
{
110+
if (extruderSelector.visible)
111+
{
112+
return UM.Preferences.getValue("sidebargui/expand_extruder_configuration")
113+
}
114+
return false
115+
}
109116
width: parent.width
110117
height: visible ? childrenRect.height : 0
111118
children: [ configurationMenu.contentItem ]
@@ -139,22 +146,6 @@ Cura.RoundedRectangle
139146
customConfiguration.children[3].children[1].spacing = UM.Theme.getSize("default_lining").height
140147
}
141148
}
142-
143-
Connections
144-
{
145-
target: extruderSelector
146-
onVisibleChanged:
147-
{
148-
if (!extruderSelector.visible)
149-
{
150-
extruderConfiguration.visible = false
151-
}
152-
else
153-
{
154-
extruderConfiguration.visible = UM.Preferences.getValue("sidebargui/expand_extruder_configuration")
155-
}
156-
}
157-
}
158149
}
159150
}
160151

0 commit comments

Comments
 (0)