From d1f2d6f45d4dd9877011cef2984f50bb9c553488 Mon Sep 17 00:00:00 2001 From: ChrisTerBeke Date: Wed, 24 Jan 2018 14:02:44 +0100 Subject: [PATCH] Fix checking material_used per extruder for analytics - CURA-4858 --- plugins/SliceInfoPlugin/SliceInfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/SliceInfoPlugin/SliceInfo.py b/plugins/SliceInfoPlugin/SliceInfo.py index bcdb1bb407..971a324aa2 100755 --- a/plugins/SliceInfoPlugin/SliceInfo.py +++ b/plugins/SliceInfoPlugin/SliceInfo.py @@ -107,7 +107,7 @@ class SliceInfo(Extension): "brand": extruder.material.getMetaData().get("brand", "") } extruder_position = int(extruder.getMetaDataEntry("position", "0")) - if extruder_position in print_information.materialLengths: + if len(print_information.materialLengths) > extruder_position: extruder_dict["material_used"] = print_information.materialLengths[extruder_position] extruder_dict["variant"] = extruder.variant.getName() extruder_dict["nozzle_size"] = extruder.getProperty("machine_nozzle_size", "value")