mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 07:33:57 -06:00
Set job name to "unnamed" if user types in nothing
CURA-5367
This commit is contained in:
parent
30cbdfed69
commit
bb313c45a9
1 changed files with 3 additions and 4 deletions
|
@ -81,10 +81,9 @@ Item {
|
||||||
text: PrintInformation.jobName
|
text: PrintInformation.jobName
|
||||||
horizontalAlignment: TextInput.AlignRight
|
horizontalAlignment: TextInput.AlignRight
|
||||||
onEditingFinished: {
|
onEditingFinished: {
|
||||||
PrintInformation.setJobName(text, true);
|
text = text == "" ? "unnamed" : text;
|
||||||
if (printJobTextfield.text != ''){
|
PrintInformation.setJobName(printJobTextfield.text, true);
|
||||||
printJobTextfield.focus = false;
|
printJobTextfield.focus = false;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
validator: RegExpValidator {
|
validator: RegExpValidator {
|
||||||
regExp: /^[^\\ \/ \*\?\|\[\]]*$/
|
regExp: /^[^\\ \/ \*\?\|\[\]]*$/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue