1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-29 16:16:38 +00:00

Fix EditorSpinSlider when hidden

This commit is contained in:
kit
2024-08-01 12:14:56 -04:00
parent 3978628c6c
commit d357a7d0f9

View File

@@ -614,13 +614,13 @@ void EditorSpinSlider::_value_focus_exited() {
// -> TAB was pressed // -> TAB was pressed
// -> modal_close was not called // -> modal_close was not called
// -> need to close/hide manually // -> need to close/hide manually
if (value_input_closed_frame != Engine::get_singleton()->get_frames_drawn()) { if (!is_visible_in_tree() || value_input_closed_frame != Engine::get_singleton()->get_frames_drawn()) {
// Hidden or something else took focus.
if (value_input_popup) { if (value_input_popup) {
value_input_popup->hide(); value_input_popup->hide();
} }
//tab was pressed
} else { } else {
//enter, click, esc // Enter or Esc was pressed.
grab_focus(); grab_focus();
} }