mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-13 10:33:15 +08: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
@ -98,9 +98,9 @@ SettingItem
|
|||||||
|
|
||||||
selectByMouse: true;
|
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
|
Binding
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user