Browse Source

Fix scroll to description

kobewi 1 năm trước cách đây
mục cha
commit
5a8066bd50
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      editor/editor_help.cpp

+ 2 - 1
editor/editor_help.cpp

@@ -2306,7 +2306,8 @@ void EditorHelp::_help_callback(const String &p_topic) {
 	}
 
 	if (class_desc->is_ready()) {
-		callable_mp(class_desc, &RichTextLabel::scroll_to_paragraph).call_deferred(line);
+		// call_deferred() is not enough.
+		class_desc->connect("draw", callable_mp(class_desc, &RichTextLabel::scroll_to_paragraph).bind(line), CONNECT_ONE_SHOT | CONNECT_DEFERRED);
 	} else {
 		scroll_to = line;
 	}