Explorar el Código

Caret blink no longer updates when hidden, issue 5100

Paulb23 hace 9 años
padre
commit
e260e3872c
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      scene/gui/text_edit.cpp

+ 3 - 1
scene/gui/text_edit.cpp

@@ -3261,7 +3261,9 @@ void TextEdit::_reset_caret_blink_timer() {
 
 void TextEdit::_toggle_draw_caret() {
 	draw_caret = !draw_caret;
-	update();
+	if (is_visible()) {
+		update();
+	}
 }
 
 void TextEdit::_update_caches() {