mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 13:34:01 -06:00
Increase maximum integer length to 12 characters
This may cause overflows if the integer type is 32-bit, but we tend to use 64-bit anyway. And 9,999,999 was already an overflow too. Fixes #12859.
This commit is contained in:
parent
fdad2590da
commit
d27ed71518
1 changed files with 2 additions and 2 deletions
|
@ -153,13 +153,13 @@ SettingItem
|
|||
selectionColor: UM.Theme.getColor("text_selection")
|
||||
selectByMouse: true
|
||||
|
||||
maximumLength: (definition.type == "str" || definition.type == "[int]") ? -1 : 10
|
||||
maximumLength: (definition.type == "str" || definition.type == "[int]") ? -1 : 12
|
||||
|
||||
// Since [int] & str don't have a max length, they need to be clipped (since clipping is expensive, this
|
||||
// should be done as little as possible)
|
||||
clip: definition.type == "str" || definition.type == "[int]"
|
||||
|
||||
validator: RegularExpressionValidator { regularExpression: (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
|
||||
validator: RegularExpressionValidator { regularExpression: (definition.type == "[int]") ? /^\[?(\s*-?[0-9]{0,11}\s*,)*(\s*-?[0-9]{0,11})\s*\]?$/ : (definition.type == "int") ? /^-?[0-9]{0,12}$/ : (definition.type == "float") ? /^-?[0-9]{0,11}[.,]?[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