Fix error about casting undefined to QString

This commit is contained in:
fieldOfView 2016-11-09 13:25:04 +01:00
parent 35a3bdc924
commit 189e3e30d9

View file

@ -21,7 +21,11 @@ SettingItem
id: extruders_model id: extruders_model
onModelChanged: control.color = extruders_model.getItem(control.currentIndex).color onModelChanged: control.color = extruders_model.getItem(control.currentIndex).color
} }
property string color: extruders_model.getItem(control.currentIndex).color property string color:
{
var model_color = extruders_model.getItem(control.currentIndex).color;
return (model_color) ? model_color : "";
}
textRole: "name" textRole: "name"