Make handling of rename line-edit popups more robust

This commit is contained in:
Pedro J. Estébanez
2024-05-01 13:39:54 +02:00
parent 259d576f6e
commit eb2bd41fb8
4 changed files with 20 additions and 6 deletions

View File

@ -3152,9 +3152,7 @@ int Tree::propagate_mouse_event(const Point2i &p_pos, int x_ofs, int y_ofs, int
}
void Tree::_text_editor_popup_modal_close() {
if (Input::get_singleton()->is_key_pressed(Key::ESCAPE) ||
Input::get_singleton()->is_key_pressed(Key::KP_ENTER) ||
Input::get_singleton()->is_key_pressed(Key::ENTER)) {
if (popup_editor->get_hide_reason() == Popup::HIDE_REASON_CANCELED) {
return;
}