diff options
author | fieldOfView <aldo@fieldofview.com> | 2018-03-29 15:46:33 +0300 |
---|---|---|
committer | fieldOfView <aldo@fieldofview.com> | 2018-03-29 15:46:33 +0300 |
commit | 272796fd959ac65dc857fb9de8f3542d43166bbc (patch) | |
tree | 71e06e679c35c20f720503024da10ad8a8eb9980 /resources/qml/SidebarHeader.qml | |
parent | 07e1a21aeb5f8ec0e8cb0898cfcd30057bfd5225 (diff) |
Prevent QML warning
Diffstat (limited to 'resources/qml/SidebarHeader.qml')
-rw-r--r-- | resources/qml/SidebarHeader.qml | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 7590beddc4..1e0a293155 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -17,8 +17,17 @@ Column property int currentExtruderIndex: Cura.ExtruderManager.activeExtruderIndex; property bool currentExtruderVisible: extrudersList.visible; property bool printerConnected: Cura.MachineManager.printerConnected - property bool hasManyPrinterTypes: printerConnected ? Cura.MachineManager.printerOutputDevices[0].connectedPrintersTypeCount.length > 1 : false - + property bool hasManyPrinterTypes: + { + if (printerConnected) + { + if (Cura.MachineManager.printerOutputDevices[0].connectedPrintersTypeCount != null) + { + return Cura.MachineManager.printerOutputDevices[0].connectedPrintersTypeCount.length > 1; + } + } + return false; + } spacing: Math.round(UM.Theme.getSize("sidebar_margin").width * 0.9) signal showTooltip(Item item, point location, string text) |