Prevent connect scroll_to_paragraph
multiple times to class_desc
This commit is contained in:
parent
be56cab58c
commit
b33811d46b
@ -2340,6 +2340,9 @@ void EditorHelp::_help_callback(const String &p_topic) {
|
||||
|
||||
if (class_desc->is_ready()) {
|
||||
// call_deferred() is not enough.
|
||||
if (class_desc->is_connected(SceneStringName(draw), callable_mp(class_desc, &RichTextLabel::scroll_to_paragraph))) {
|
||||
class_desc->disconnect(SceneStringName(draw), callable_mp(class_desc, &RichTextLabel::scroll_to_paragraph));
|
||||
}
|
||||
class_desc->connect(SceneStringName(draw), callable_mp(class_desc, &RichTextLabel::scroll_to_paragraph).bind(line), CONNECT_ONE_SHOT | CONNECT_DEFERRED);
|
||||
} else {
|
||||
scroll_to = line;
|
||||
|
Loading…
Reference in New Issue
Block a user