diff options
author | Paulb23 <p_batty@hotmail.co.uk> | 2016-11-06 14:15:59 +0000 |
---|---|---|
committer | Paulb23 <p_batty@hotmail.co.uk> | 2016-11-06 14:15:59 +0000 |
commit | 7b036a94bf9af558dab35a56a9c0b6dd8bae105b (patch) | |
tree | 82702ad97672c368785c29d2e053618608a9306d | |
parent | a4570cb4615f5bbbf0091b3832101179d5e1662a (diff) |
Caret blink will no longer cause redraw without focus, issue 6167
-rw-r--r-- | scene/gui/line_edit.cpp | 2 | ||||
-rw-r--r-- | scene/gui/text_edit.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index f7d74b2b49..eecc730f5c 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -853,7 +853,7 @@ void LineEdit::_reset_caret_blink_timer() { void LineEdit::_toggle_draw_caret() { draw_caret = !draw_caret; - if (is_visible()) { + if (is_visible() && has_focus() && window_has_focus) { update(); } } diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index f1a2823e8f..9b3b047712 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -3458,7 +3458,7 @@ void TextEdit::_reset_caret_blink_timer() { void TextEdit::_toggle_draw_caret() { draw_caret = !draw_caret; - if (is_visible()) { + if (is_visible() && has_focus() && window_has_focus) { update(); } } |