Skip to content

Commit 26292a4

Browse files
committed
Fix printer selector in monitor stage for Cura 4.7 and master
1 parent ad7b626 commit 26292a4

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

resources/qml/MonitorStageMenu.qml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,16 @@ Item
1717
property var messageStack
1818
property var stagesListContainer
1919

20+
property bool is40
21+
property bool isLE44
22+
property bool isLE46
23+
2024
Component.onCompleted:
2125
{
26+
is40 = (CuraSDKVersion == "6.0.0")
27+
isLE44 = (CuraSDKVersion <= "7.0.0")
28+
isLE46 = (CuraSDKVersion <= "7.2.0") && UM.Application.version != "master"
29+
2230
// adjust message stack position for sidebar
2331
messageStack = base.contentItem.children[0].children[3].children[8]
2432
messageStack.anchors.leftMargin = Math.floor((base.width - printSetupSelector.width) / 2)
@@ -53,7 +61,11 @@ Item
5361

5462
Component.onCompleted: {
5563
machineSelection.children[1].visible = false // remove shadow
56-
var machineSelectionHeader = machineSelection.children[0].children[3].children[0]
64+
if(isLE46) {
65+
var machineSelectionHeader = machineSelection.children[0].children[3].children[0]
66+
} else {
67+
var machineSelectionHeader = machineSelection.children[0].children[3].children[1]
68+
}
5769
// adjust header margins, because the height is smaller than designed
5870
machineSelectionHeader.anchors.topMargin = 0
5971
machineSelectionHeader.anchors.bottomMargin = 0

0 commit comments

Comments
 (0)