mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-07-03 17:05:43 +02:00
Added a check for the correctness of the entered characters in numerical fields.
This commit is contained in:
@@ -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")));
|
||||||
|
|||||||
Reference in New Issue
Block a user