From ee4c533ca6f76fb32310f51ea0c98c8fdde58918 Mon Sep 17 00:00:00 2001 From: Zae Date: Fri, 15 Oct 2021 16:52:45 +0800 Subject: [PATCH] [3.x] Fix EditorSpinSlider freezes editor when tabbing focus rapidly. --- editor/editor_spin_slider.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp index aca5dd4c3f0..cccf78fb659 100644 --- a/editor/editor_spin_slider.cpp +++ b/editor/editor_spin_slider.cpp @@ -528,9 +528,9 @@ void EditorSpinSlider::_focus_entered() { value_input->set_text(get_text_value()); value_input->set_position(gr.position); value_input->set_size(gr.size); - value_input->call_deferred("show_modal"); - value_input->call_deferred("grab_focus"); - value_input->call_deferred("select_all"); + value_input->show_modal(); + value_input->select_all(); + value_input->call_deferred("grab_focus"); // deferred to avoid losing focus value_input->set_focus_next(find_next_valid_focus()->get_path()); value_input->set_focus_previous(find_prev_valid_focus()->get_path()); }