Skip to content

Commit 07093c4

Browse files
committed
Merge pull request godotengine#100275 from KoBeWi/highest_level_clearance
Don't emit `text_changed` signal when clearing empty LineEdit
2 parents 9a4142c + b8b1584 commit 07093c4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scene/gui/line_edit.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1859,8 +1859,12 @@ Array LineEdit::get_structured_text_bidi_override_options() const {
18591859
}
18601860

18611861
void LineEdit::clear() {
1862+
bool was_empty = text.is_empty();
18621863
clear_internal();
1863-
_text_changed();
1864+
_clear_redo();
1865+
if (!was_empty) {
1866+
_emit_text_change();
1867+
}
18641868

18651869
// This should reset virtual keyboard state if needed.
18661870
if (editing) {

0 commit comments

Comments
 (0)