Fix decimal settings not permitting typing a '-' character
This commit is contained in:
@@ -480,9 +480,9 @@ bool IsValidChar(WChar key, CharSetFilter afilter)
|
|||||||
case CS_ALPHANUMERAL: return IsPrintable(key);
|
case CS_ALPHANUMERAL: return IsPrintable(key);
|
||||||
case CS_NUMERAL: return (key >= '0' && key <= '9');
|
case CS_NUMERAL: return (key >= '0' && key <= '9');
|
||||||
#if !defined(STRGEN) && !defined(SETTINGSGEN)
|
#if !defined(STRGEN) && !defined(SETTINGSGEN)
|
||||||
case CS_NUMERAL_DECIMAL: return (key >= '0' && key <= '9') || key == '.' || key == GetDecimalSeparatorChar();
|
case CS_NUMERAL_DECIMAL: return (key >= '0' && key <= '9') || key == '.' || key == '-' || key == GetDecimalSeparatorChar();
|
||||||
#else
|
#else
|
||||||
case CS_NUMERAL_DECIMAL: return (key >= '0' && key <= '9') || key == '.';
|
case CS_NUMERAL_DECIMAL: return (key >= '0' && key <= '9') || key == '.' || key == '-';
|
||||||
#endif
|
#endif
|
||||||
case CS_NUMERAL_SPACE: return (key >= '0' && key <= '9') || key == ' ';
|
case CS_NUMERAL_SPACE: return (key >= '0' && key <= '9') || key == ' ';
|
||||||
case CS_ALPHA: return IsPrintable(key) && !(key >= '0' && key <= '9');
|
case CS_ALPHA: return IsPrintable(key) && !(key >= '0' && key <= '9');
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
enum CharSetFilter {
|
enum CharSetFilter {
|
||||||
CS_ALPHANUMERAL, ///< Both numeric and alphabetic and spaces and stuff
|
CS_ALPHANUMERAL, ///< Both numeric and alphabetic and spaces and stuff
|
||||||
CS_NUMERAL, ///< Only numeric ones
|
CS_NUMERAL, ///< Only numeric ones
|
||||||
CS_NUMERAL_DECIMAL, ///< Only numeric and decimal separaters
|
CS_NUMERAL_DECIMAL, ///< Only numeric, decimal separaters, and minus/negative
|
||||||
CS_NUMERAL_SPACE, ///< Only numbers and spaces
|
CS_NUMERAL_SPACE, ///< Only numbers and spaces
|
||||||
CS_ALPHA, ///< Only alphabetic values
|
CS_ALPHA, ///< Only alphabetic values
|
||||||
CS_HEXADECIMAL, ///< Only hexadecimal characters
|
CS_HEXADECIMAL, ///< Only hexadecimal characters
|
||||||
|
Reference in New Issue
Block a user