From bb313c45a9465d4097b3b4d3a31ed6f99ceca278 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Thu, 31 May 2018 16:25:56 +0200 Subject: [PATCH] Set job name to "unnamed" if user types in nothing CURA-5367 --- resources/qml/JobSpecs.qml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/resources/qml/JobSpecs.qml b/resources/qml/JobSpecs.qml index f9ce286706..6cd9999db7 100644 --- a/resources/qml/JobSpecs.qml +++ b/resources/qml/JobSpecs.qml @@ -81,10 +81,9 @@ Item { text: PrintInformation.jobName horizontalAlignment: TextInput.AlignRight onEditingFinished: { - PrintInformation.setJobName(text, true); - if (printJobTextfield.text != ''){ - printJobTextfield.focus = false; - } + text = text == "" ? "unnamed" : text; + PrintInformation.setJobName(printJobTextfield.text, true); + printJobTextfield.focus = false; } validator: RegExpValidator { regExp: /^[^\\ \/ \*\?\|\[\]]*$/