mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 22:54:01 -06:00
Allow strings with actual text
Previously string fields would only accept numbers, which is ridiculous.
This commit is contained in:
parent
f82aecb7ca
commit
dd2c25868b
1 changed files with 2 additions and 2 deletions
|
@ -98,9 +98,9 @@ SettingItem
|
|||
|
||||
selectByMouse: true;
|
||||
|
||||
maximumLength: (definition.type == "[int]") ? 20 : 10;
|
||||
maximumLength: (definition.type == "[int]") ? 20 : (definition.type == "str") ? -1 : 10;
|
||||
|
||||
validator: RegExpValidator { regExp: (definition.type == "[int]") ? /^\[?(\s*-?[0-9]{0,9}\s*,)*(\s*-?[0-9]{0,9})\s*\]?$/ : (definition.type == "int") ? /^-?[0-9]{0,10}$/ : /^-?[0-9]{0,9}[.,]?[0-9]{0,10}$/ } // definition.type property from parent loader used to disallow fractional number entry
|
||||
validator: RegExpValidator { regExp: (definition.type == "[int]") ? /^\[?(\s*-?[0-9]{0,9}\s*,)*(\s*-?[0-9]{0,9})\s*\]?$/ : (definition.type == "int") ? /^-?[0-9]{0,10}$/ : (definition.type == "float") ? /^-?[0-9]{0,9}[.,]?[0-9]{0,10}$/ : /^.*$/ } // definition.type property from parent loader used to disallow fractional number entry
|
||||
|
||||
Binding
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue