mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 14:44:13 -06:00
Reduce the maximum precision of floats in SettingTextField inputs
No settings in Cura require more than 3 digits of precision. Many settings are in mm, and CuraEngine does its calculations in while microns. Having more precision in the frontend than in the backend apparently thoroughly confuses some people. Fixes #4368
This commit is contained in:
parent
3e7021d729
commit
53b481ff5d
1 changed files with 1 additions and 1 deletions
|
@ -152,7 +152,7 @@ SettingItem
|
|||
maximumLength: (definition.type == "str" || definition.type == "[int]") ? -1 : 10;
|
||||
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
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue