Merge pull request #1122 from fieldOfView/fix_qml_errors

Fix qml errors
This commit is contained in:
Jaime van Kessel 2016-11-09 13:44:42 +01:00 committed by GitHub
commit fdbbda07be
2 changed files with 9 additions and 1 deletions

View file

@ -424,6 +424,10 @@ UM.MainWindow
visible: base.monitoringPrint
onVisibleChanged:
{
if(Cura.MachineManager.printerOutputDevices.length == 0 )
{
return;
}
if(visible)
{
Cura.MachineManager.printerOutputDevices[0].startCamera()

View file

@ -21,7 +21,11 @@ SettingItem
id: extruders_model
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"