Limit number of special characters

There is also a more advanced attempt that allows more, but I've commented it out because it doesn't quite work yet. Special characters now always count for 12.

Contributes to issue CURA-2652.
This commit is contained in:
Ghostkeeper 2016-10-27 21:55:48 +02:00
parent 37d1c0be36
commit 717248bd78
No known key found for this signature in database
GPG key ID: C5F96EE2BC0F7E75
2 changed files with 60 additions and 8 deletions

View file

@ -175,6 +175,14 @@ UM.Dialog
text: getMachineName()
implicitWidth: UM.Theme.getSize("standard_list_input").width
maximumLength: 40
//validator: Cura.MachineNameValidator { } //TODO: Gives a segfault in PyQt5.6. For now, we must use a signal on text changed.
validator: RegExpValidator
{
regExp: {
machineName.machine_name_validator.machineNameRegex
}
}
property var machine_name_validator: Cura.MachineNameValidator { }
anchors.bottom:parent.bottom
}