mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-13 13:38:59 +08:00
Added a check for the correctness of the entered characters in numerical fields.
This commit is contained in:
parent
a0090fccb5
commit
942a3340aa
@ -105,7 +105,11 @@ namespace Slic3r { namespace GUI {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
double val;
|
double val;
|
||||||
str.ToCDouble(&val);
|
if(!str.ToCDouble(&val))
|
||||||
|
{
|
||||||
|
show_error(m_parent, _(L("Input value contains incorrect symbol(s).\nUse, please, only digits")));
|
||||||
|
set_value(double_to_string(val), true);
|
||||||
|
}
|
||||||
if (m_opt.min > val || val > m_opt.max)
|
if (m_opt.min > val || val > m_opt.max)
|
||||||
{
|
{
|
||||||
show_error(m_parent, _(L("Input value is out of range")));
|
show_error(m_parent, _(L("Input value is out of range")));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user