mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 15:13:56 -06:00
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:
parent
37d1c0be36
commit
717248bd78
2 changed files with 60 additions and 8 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue