mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-13 05:53:18 +08:00
Set job name to "unnamed" if user types in nothing
CURA-5367
This commit is contained in:
parent
30cbdfed69
commit
bb313c45a9
@ -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…
x
Reference in New Issue
Block a user