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:
xun.zhang 2025-03-18 10:29:54 +08:00 committed by lane.wei
parent 0476e92e0f
commit 21f91c3b1d
1 changed files with 1 additions and 1 deletions

View File

@ -340,7 +340,7 @@ void Field::get_value_by_opt_type(wxString& str, const bool check_value/* = true
case coStrings:
case coFloatOrPercent:
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.;
const char dec_sep = is_decimal_separator_point() ? '.' : ',';