From 64788069a0543a4dad7807caa2c890dc08f71940 Mon Sep 17 00:00:00 2001 From: ydeltastar Date: Sat, 7 Dec 2024 18:24:21 -0300 Subject: [PATCH] Fix scroll to symbol's documentation --- doc/classes/RichTextLabel.xml | 1 + editor/editor_help.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 47c95c97ff5..af5dc9db348 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -712,6 +712,7 @@ Triggered when the document is fully loaded. + [b]Note:[/b] This can happen before the text is processed for drawing. Scrolling values may not be valid until the document is drawn for the first time after this signal. diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index dd8628b113f..75816765b07 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -270,7 +270,7 @@ void EditorHelp::_search(bool p_search_previous) { void EditorHelp::_class_desc_finished() { if (scroll_to >= 0) { - class_desc->scroll_to_paragraph(scroll_to); + class_desc->connect(SceneStringName(draw), callable_mp(class_desc, &RichTextLabel::scroll_to_paragraph).bind(scroll_to), CONNECT_ONE_SHOT | CONNECT_DEFERRED); } scroll_to = -1; }