Skip to content

Commit 0441bb1

Browse files
committed
Fix compatibility with Cura 5.2 and before
1 parent 150d44e commit 0441bb1

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

resources/qml/MonitorStageMenu.qml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,15 @@ Item
2424

2525
Component.onCompleted:
2626
{
27-
is40 = (CuraSDKVersion == "6.0.0")
28-
isLE44 = (CuraSDKVersion <= "7.0.0")
29-
isLE46 = (CuraSDKVersion <= "7.2.0")
30-
isLE410 = (CuraSDKVersion <= "7.6.0")
31-
isLE413 = (CuraSDKVersion <= "7.9.0")
32-
isLE51 = (CuraSDKVersion <= "8.1.0")
33-
isLE52 = (CuraSDKVersion <= "8.2.0")
27+
// create a version string that can be easily compared, even with the minor version >= 10
28+
var SortableSDKVersion = CuraSDKVersion.replace(/\.(\d)\./g, ".0$1.")
29+
is40 = (SortableSDKVersion == "6.00.0")
30+
isLE44 = (SortableSDKVersion <= "7.00.0")
31+
isLE46 = (SortableSDKVersion <= "7.02.0")
32+
isLE410 = (SortableSDKVersion <= "7.06.0")
33+
isLE413 = (SortableSDKVersion <= "7.09.0")
34+
isLE51 = (SortableSDKVersion <= "8.01.0")
35+
isLE52 = (SortableSDKVersion <= "8.02.0")
3436

3537
// adjust message stack position for sidebar
3638
var messageStack

resources/qml/SidebarStageMenu.qml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Item
3434
Component.onCompleted:
3535
{
3636
// create a version string that can be easily compared, even with the minor version >= 10
37-
var SortableSDKVersion = parseInt(CuraSDKVersion.replace(/\.(\d)\./g, ".0$1."))
37+
var SortableSDKVersion = CuraSDKVersion.replace(/\.(\d)\./g, ".0$1.")
3838
is40 = (SortableSDKVersion == "6.00.0")
3939
isLE43 = (SortableSDKVersion <= "6.03.0")
4040
isLE44 = (SortableSDKVersion <= "7.00.0")
@@ -44,7 +44,7 @@ Item
4444
isLE50 = (SortableSDKVersion <= "8.00.0")
4545
isLE51 = (SortableSDKVersion <= "8.01.0")
4646
isLE52 = (SortableSDKVersion <= "8.02.0")
47-
isLE59 = (SortableSDKVersion <= "8.09.0") && CuraApplication.version != "master" && CuraApplication.version != "dev"
47+
isLE59 = (SortableSDKVersion <= "8.09.0")
4848
if(is40)
4949
{
5050
CuraApplication.log("SidebarGUIPlugin patching interface for Cura 4.0")

0 commit comments

Comments
 (0)