From a62b0587ad4d7f937dbddc50890fe578621bdc99 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Mon, 19 Sep 2016 14:35:54 +0200 Subject: [PATCH] Show correct selected gcode flavor now there are more than 2 options CURA-2304 --- .../MachineSettingsAction/MachineSettingsAction.qml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/MachineSettingsAction/MachineSettingsAction.qml b/plugins/MachineSettingsAction/MachineSettingsAction.qml index 8b4407745e..a1d9bcfafd 100644 --- a/plugins/MachineSettingsAction/MachineSettingsAction.qml +++ b/plugins/MachineSettingsAction/MachineSettingsAction.qml @@ -148,7 +148,15 @@ Cura.MachineAction ComboBox { model: ["RepRap (Marlin/Sprinter)", "UltiGCode", "Repetier"] - currentIndex: machineGCodeFlavorProvider.properties.value != model[1] ? 0 : 1 + currentIndex: + { + var index = model.indexOf(machineGCodeFlavorProvider.properties.value); + if(index == -1) + { + index = 0; + } + return index + } onActivated: { machineGCodeFlavorProvider.setPropertyValue("value", model[index]);