diff options
author | William Deurwaarder <william.git@xs4all.nl> | 2021-09-02 21:51:27 +0200 |
---|---|---|
committer | William Deurwaarder <william.git@xs4all.nl> | 2021-09-02 21:51:27 +0200 |
commit | d927d4203c15119292f75c4077f929e9b1e477b6 (patch) | |
tree | ce98b7a9bcd06b9d17c1ec76cc15766e75db54bf | |
parent | b73e7623c82f27f6327922217ad72198223a7109 (diff) |
Symbol lookup jumps to the correct position in help editor
Commit `e4651a4` introduced `scroll_to_paragraph` and changed the implementation
of `scroll_to_line`, which also counts lines within paragraphs.
The help editor still used the `scroll_to_line` method
while it should use the newly implemented `scroll_to_paragraph' as that is
stored in its tables.
-rw-r--r-- | editor/editor_help.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index 24b6ba1a14..7ea9fdb02b 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -117,7 +117,7 @@ void EditorHelp::_class_desc_select(const String &p_select) { } else { if (table->has(link)) { // Found in the current page - class_desc->scroll_to_line((*table)[link]); + class_desc->scroll_to_paragraph((*table)[link]); } else { if (topic == "class_enum") { // Try to find the enum in @GlobalScope @@ -1343,7 +1343,7 @@ void EditorHelp::_help_callback(const String &p_topic) { } } - class_desc->call_deferred(SNAME("scroll_to_line"), line); + class_desc->call_deferred(SNAME("scroll_to_paragraph"), line); } static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) { @@ -1651,7 +1651,7 @@ Vector<Pair<String, int>> EditorHelp::get_sections() { void EditorHelp::scroll_to_section(int p_section_index) { int line = section_line[p_section_index].second; - class_desc->scroll_to_line(line); + class_desc->scroll_to_paragraph(line); } void EditorHelp::popup_search() { |