diff options
Diffstat (limited to 'editor/editor_spin_slider.cpp')
-rw-r--r-- | editor/editor_spin_slider.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp index 2d3ec437c6..7b30eaa6ac 100644 --- a/editor/editor_spin_slider.cpp +++ b/editor/editor_spin_slider.cpp @@ -577,8 +577,13 @@ void EditorSpinSlider::_value_focus_exited() { return; } + if (is_read_only()) { + // Spin slider has become read only while it was being edited. + return; + } + _evaluate_input_text(); - // focus is not on the same element after the vlalue_input was exited + // focus is not on the same element after the value_input was exited // -> focus is on next element // -> TAB was pressed // -> modal_close was not called @@ -608,6 +613,10 @@ void EditorSpinSlider::_grabber_mouse_exited() { void EditorSpinSlider::set_read_only(bool p_enable) { read_only = p_enable; + if (read_only && value_input) { + value_input->release_focus(); + } + queue_redraw(); } |