From 21f91c3b1d91ff02130d5a4d94965d0bc4d5bcbe Mon Sep 17 00:00:00 2001 From: "xun.zhang" Date: Tue, 18 Mar 2025 10:29:54 +0800 Subject: [PATCH] ENH: add check for FloatsOrPercents illegal values jira: 10871 Signed-off-by: xun.zhang Change-Id: I1c8514da88ff0d0d6c7e02097d60f2e3c53d9d71 --- src/slic3r/GUI/Field.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slic3r/GUI/Field.cpp b/src/slic3r/GUI/Field.cpp index ae52aae7b..d11db7d43 100644 --- a/src/slic3r/GUI/Field.cpp +++ b/src/slic3r/GUI/Field.cpp @@ -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() ? '.' : ',';