Make sure that printer name is not empty

CURA-6435
This commit is contained in:
Lipu Fei 2019-04-05 09:35:00 +02:00
parent b269dc95b0
commit b0fd6628a5
3 changed files with 26 additions and 1 deletions

View file

@ -32,6 +32,7 @@ Item
// User-editable printer name
property alias printerName: printerNameTextField.text
property alias isPrinterNameValid: printerNameTextField.acceptableInput
onCurrentItemChanged:
{
@ -211,6 +212,10 @@ Item
id: printerNameTextField
anchors.verticalCenter: parent.verticalCenter
width: (parent.width / 2) | 0
placeholderText: catalog.i18nc("@text", "Please give your printer a name")
// Make sure that the fill is not empty
validator: RegExpValidator { regExp: /.+/ }
}
}
}