Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfieldOfView <aldo@fieldofview.com>2018-03-29 15:46:33 +0300
committerfieldOfView <aldo@fieldofview.com>2018-03-29 15:46:33 +0300
commit272796fd959ac65dc857fb9de8f3542d43166bbc (patch)
tree71e06e679c35c20f720503024da10ad8a8eb9980 /resources/qml/SidebarHeader.qml
parent07e1a21aeb5f8ec0e8cb0898cfcd30057bfd5225 (diff)
Prevent QML warning
Diffstat (limited to 'resources/qml/SidebarHeader.qml')
-rw-r--r--resources/qml/SidebarHeader.qml13
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)