From d3a3be832fe5e0279b39520b801be6c22698e8b3 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 10 Oct 2019 16:02:13 +0200 Subject: [PATCH] Fix QML errors when extruder list is temporarily 0 Found during work on CURA-6793. --- resources/qml/Menus/MaterialMenu.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/qml/Menus/MaterialMenu.qml b/resources/qml/Menus/MaterialMenu.qml index a574e240d3..94a5262b72 100644 --- a/resources/qml/Menus/MaterialMenu.qml +++ b/resources/qml/Menus/MaterialMenu.qml @@ -13,8 +13,8 @@ Menu title: catalog.i18nc("@label:category menu label", "Material") property int extruderIndex: 0 - property string currentRootMaterialId: Cura.MachineManager.currentRootMaterialId[extruderIndex] - property string activeMaterialId: Cura.MachineManager.activeMachine.extruderList[extruderIndex].material.id + property var currentRootMaterialId: Cura.MachineManager.currentRootMaterialId[extruderIndex] + property string activeMaterialId: Cura.MachineManager.activeMachine.extruderList[extruderIndex] ? Cura.MachineManager.activeMachine.extruderList[extruderIndex].material.id : "" property bool updateModels: true Cura.FavoriteMaterialsModel {