mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 07:38:58 +08:00
Merge pull request #4445 from fieldOfView/fix_setting_float_precision
Reduce the maximum precision of floats in SettingTextField inputs
This commit is contained in:
commit
e963fd2d85
@ -152,7 +152,7 @@ SettingItem
|
|||||||
maximumLength: (definition.type == "str" || definition.type == "[int]") ? -1 : 10;
|
maximumLength: (definition.type == "str" || definition.type == "[int]") ? -1 : 10;
|
||||||
clip: true; //Hide any text that exceeds the width of the text box.
|
clip: true; //Hide any text that exceeds the width of the text box.
|
||||||
|
|
||||||
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
|
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,3}$/ : /^.*$/ } // definition.type property from parent loader used to disallow fractional number entry
|
||||||
|
|
||||||
Binding
|
Binding
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user