From 35a3bdc9242eedcb3905856bf584f3efb5fbbbda Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 9 Nov 2016 13:18:15 +0100 Subject: [PATCH 1/2] Fix qml error about stopCamera when no printer is connected --- resources/qml/Cura.qml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 5380eaf7ca..5c5a1cdc9d 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -424,6 +424,10 @@ UM.MainWindow visible: base.monitoringPrint onVisibleChanged: { + if(Cura.MachineManager.printerOutputDevices.length == 0 ) + { + return; + } if(visible) { Cura.MachineManager.printerOutputDevices[0].startCamera() From 189e3e30d9eb097aea53f67e0c28c1663e2b0fba Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 9 Nov 2016 13:25:04 +0100 Subject: [PATCH 2/2] Fix error about casting undefined to QString --- resources/qml/Settings/SettingExtruder.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/qml/Settings/SettingExtruder.qml b/resources/qml/Settings/SettingExtruder.qml index ff30a7146e..82d7def5ce 100644 --- a/resources/qml/Settings/SettingExtruder.qml +++ b/resources/qml/Settings/SettingExtruder.qml @@ -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"