mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 21:25:58 +08:00
Show correct selected gcode flavor now there are more than 2 options
CURA-2304
This commit is contained in:
parent
2e7dbea559
commit
a62b0587ad
@ -148,7 +148,15 @@ Cura.MachineAction
|
|||||||
ComboBox
|
ComboBox
|
||||||
{
|
{
|
||||||
model: ["RepRap (Marlin/Sprinter)", "UltiGCode", "Repetier"]
|
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:
|
onActivated:
|
||||||
{
|
{
|
||||||
machineGCodeFlavorProvider.setPropertyValue("value", model[index]);
|
machineGCodeFlavorProvider.setPropertyValue("value", model[index]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user