Skip to content

Commit d18e24f

Browse files
committed
Reenable sidebar on Prepare stage when presliced data is loaded
1 parent 01a8c16 commit d18e24f

2 files changed

Lines changed: 19 additions & 7 deletions

File tree

resources/qml/PrintSetupSummary.qml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ import Cura 1.1 as Cura
99

1010
Cura.RoundedRectangle
1111
{
12+
property bool summaryEnabled: (prepareStageActive || !preSlicedData)
13+
1214
color:
1315
{
14-
if (preSlicedData)
16+
if (!summaryEnabled)
1517
{
1618
return UM.Theme.getColor("action_button_disabled")
1719
}
@@ -31,7 +33,7 @@ Cura.RoundedRectangle
3133
Cura.PrintSetupSelectorHeader
3234
{
3335
id: printSetupSummary
34-
visible: !preSlicedData
36+
visible: summaryEnabled
3537

3638
anchors
3739
{
@@ -55,7 +57,7 @@ Cura.RoundedRectangle
5557
rightMargin: UM.Theme.getSize("default_margin").width
5658
}
5759
source: UM.Theme.getIcon("pencil")
58-
visible: !preSlicedData
60+
visible: summaryEnabled
5961
width: UM.Theme.getSize("action_button_icon").width
6062
height: UM.Theme.getSize("action_button_icon").height
6163
color: UM.Theme.getColor("small_button_text")
@@ -65,7 +67,7 @@ Cura.RoundedRectangle
6567
{
6668
id: extruderSummary
6769
enabled: false
68-
visible: !preSlicedData
70+
visible: summaryEnabled
6971

7072
anchors
7173
{
@@ -81,7 +83,7 @@ Cura.RoundedRectangle
8183

8284
Label
8385
{
84-
visible: preSlicedData
86+
visible: !summaryEnabled
8587
anchors.top: parent.top
8688
anchors.topMargin: UM.Theme.getSize("thick_margin").height
8789
anchors.left: parent.left
@@ -98,7 +100,7 @@ Cura.RoundedRectangle
98100
{
99101
id: mouseArea
100102
hoverEnabled: true
101-
enabled: !preSlicedData
103+
enabled: summaryEnabled
102104
anchors.fill: parent
103105

104106
onClicked:

resources/qml/SidebarStageMenu.qml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ Item
2121
property bool isLE44
2222
property bool isLE46
2323

24+
property bool prepareStageActive: UM.Controller.activeStage.toString().indexOf("PrepareStage") > 0
2425
property bool preSlicedData: PrintInformation !== null && PrintInformation.preSliced
2526
property bool settingsVisible: UM.Preferences.getValue("view/settings_visible")
26-
property bool sidebarVisible: settingsVisible && !preSlicedData
27+
property bool sidebarVisible: settingsVisible && (prepareStageActive || !preSlicedData)
2728
property real sidebarWidth: sidebarVisible ? printSetupSelector.width : 0
2829

2930
Component.onCompleted:
@@ -155,6 +156,15 @@ Item
155156
}
156157
}
157158

159+
Connections
160+
{
161+
target: UM.Controller
162+
onActiveStageChanged:
163+
{
164+
prepareStageActive = (UM.Controller.activeStage.toString().indexOf("PrepareStage") == 0)
165+
}
166+
}
167+
158168
onPreSlicedDataChanged:
159169
{
160170
settingsVisible = UM.Preferences.getValue("view/settings_visible")

0 commit comments

Comments
 (0)