mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
ENH: add check for FloatsOrPercents illegal values
jira: 10871 Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: I1c8514da88ff0d0d6c7e02097d60f2e3c53d9d71 (cherry picked from commit 21f91c3b1d91ff02130d5a4d94965d0bc4d5bcbe)
This commit is contained in:
@@ -361,7 +361,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() ? '.' : ',';
|
||||||
|
|||||||
Reference in New Issue
Block a user