Fix double text_changed signal when overwriting selection in LineEdit
The part of gui_input that handles unicode wasn't checking text_changed_dirty before emitting the signal, unlike the rest of the text editing functions. Fixes #86451
This commit is contained in:
parent
13a0d6e9b2
commit
cab48493d8
1 changed files with 6 additions and 1 deletions
|
@ -624,7 +624,12 @@ void LineEdit::gui_input(const Ref<InputEvent> &p_event) {
|
|||
int prev_len = text.length();
|
||||
insert_text_at_caret(ucodestr);
|
||||
if (text.length() != prev_len) {
|
||||
_text_changed();
|
||||
if (!text_changed_dirty) {
|
||||
if (is_inside_tree()) {
|
||||
callable_mp(this, &LineEdit::_text_changed).call_deferred();
|
||||
}
|
||||
text_changed_dirty = true;
|
||||
}
|
||||
}
|
||||
accept_event();
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue