[3.x] Fix EditorSpinSlider freezes editor when tabbing focus rapidly.
This commit is contained in:
parent
ff132ca278
commit
ee4c533ca6
@ -528,9 +528,9 @@ void EditorSpinSlider::_focus_entered() {
|
|||||||
value_input->set_text(get_text_value());
|
value_input->set_text(get_text_value());
|
||||||
value_input->set_position(gr.position);
|
value_input->set_position(gr.position);
|
||||||
value_input->set_size(gr.size);
|
value_input->set_size(gr.size);
|
||||||
value_input->call_deferred("show_modal");
|
value_input->show_modal();
|
||||||
value_input->call_deferred("grab_focus");
|
value_input->select_all();
|
||||||
value_input->call_deferred("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_next(find_next_valid_focus()->get_path());
|
||||||
value_input->set_focus_previous(find_prev_valid_focus()->get_path());
|
value_input->set_focus_previous(find_prev_valid_focus()->get_path());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user