Fix QML null warnings

This commit is contained in:
Lipu Fei 2020-02-13 12:26:49 +01:00
parent 15f4d1231b
commit 65e1314538
3 changed files with 3 additions and 3 deletions

View File

@ -24,7 +24,7 @@ UM.MainWindow
title:
{
let result = "";
if(PrintInformation.jobName != "")
if(PrintInformation !== null && PrintInformation.jobName != "")
{
result += PrintInformation.jobName + " - ";
}

View File

@ -196,7 +196,7 @@ Button
rightMargin: UM.Theme.getSize("wide_margin").width
}
height: childrenRect.height
visible: configuration.buildplateConfiguration != "" && false //Buildplate is disabled as long as we have no printers that properly support buildplate swapping (so we can't test).
visible: configuration !== null && configuration.buildplateConfiguration != "" && false //Buildplate is disabled as long as we have no printers that properly support buildplate swapping (so we can't test).
// Show the type of buildplate. The first letter is capitalized
Cura.IconWithText

View File

@ -13,7 +13,7 @@ Cura.ExpandableComponent
dragPreferencesNamePrefix: "view/settings"
property bool preSlicedData: PrintInformation.preSliced
property bool preSlicedData: PrintInformation !== null && PrintInformation.preSliced
contentPadding: UM.Theme.getSize("default_lining").width
contentHeaderTitle: catalog.i18nc("@label", "Print settings")