Fix QML warning assigning undefined to an integer field

Fixes the following QML warning in the logs:
2020-03-20 14:02:13,482 - WARNING - [MainThread] UM.Qt.QtApplication.__onQmlWarning [406]: file:///home/trin/Gedeeld/Projects/Cura/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml:125:13: Unable to assign [undefined] to int

Instead it now assigns the first extruder before a printer has been created. The first extruder also doesn't exist yet at this point, but this doesn't really matter because there is no interface to show yet at this point.

Done during Turbo Testing and Tooling.
This commit is contained in:
Ghostkeeper 2020-03-20 14:17:24 +01:00
parent c44f82c44f
commit 3af91bfca7
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A

View file

@ -122,7 +122,7 @@ Item
}
}
currentIndex: supportExtruderNr.properties.value
currentIndex: (supportExtruderNr.properties.value !== undefined) ? supportExtruderNr.properties.value : 0
property string color: "#fff"
Connections