ENH: add check for FloatsOrPercents illegal values
jira: 10871 Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: I1c8514da88ff0d0d6c7e02097d60f2e3c53d9d71
This commit is contained in:
parent
0476e92e0f
commit
21f91c3b1d
|
@ -340,7 +340,7 @@ void Field::get_value_by_opt_type(wxString& str, const bool check_value/* = true
|
||||||
case coStrings:
|
case coStrings:
|
||||||
case coFloatOrPercent:
|
case coFloatOrPercent:
|
||||||
case coFloatsOrPercents: {
|
case coFloatsOrPercents: {
|
||||||
if (m_opt.type == coFloatOrPercent && !str.IsEmpty() && str.Last() != '%')
|
if ((m_opt.type == coFloatOrPercent || m_opt.type == coFloatsOrPercents) && !str.IsEmpty() && str.Last() != '%')
|
||||||
{
|
{
|
||||||
double val = 0.;
|
double val = 0.;
|
||||||
const char dec_sep = is_decimal_separator_point() ? '.' : ',';
|
const char dec_sep = is_decimal_separator_point() ? '.' : ',';
|
||||||
|
|
Loading…
Reference in New Issue