Fix warning when active stage is not yet instantiated

Edit: Originally this was more or less the same fix as what Diego just did at the same time, which caused a merge conflict, but I think my solution is more elegant than the ternary operator that was originally there so I'm keeping mine.
This commit is contained in:
Ghostkeeper 2018-12-14 13:20:43 +01:00
parent 8a4a1c9d49
commit a010823a4e
No known key found for this signature in database
GPG Key ID: 86BEF881AE2CF276

View File

@ -54,7 +54,7 @@ Item
{
text: model.name.toUpperCase()
checkable: true
checked: UM.Controller.activeStage != null ? model.id == UM.Controller.activeStage.stageId : false
checked: UM.Controller.activeStage !== null && model.id == UM.Controller.activeStage.stageId
anchors.verticalCenter: parent.verticalCenter
exclusiveGroup: mainWindowHeaderMenuGroup