diff options
Diffstat (limited to 'scene/gui/tree.cpp')
-rw-r--r-- | scene/gui/tree.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index d8788b4eca..44f71a2c4e 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -1953,6 +1953,14 @@ void Tree::text_editor_enter(String p_text) { c.val = evaluator->eval(p_text); else c.val = p_text.to_double(); + + if (c.step > 0) + c.val = Math::stepify(c.val, c.step); + if (c.val < c.min) + c.val = c.min; + else if (c.val > c.max) + c.val = c.max; + } break; default: { ERR_FAIL(); } } |