summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorGuilherme Felipe <guilhermefelipecgs@gmail.com>2017-12-18 20:35:15 -0200
committerGuilherme Felipe <guilhermefelipecgs@gmail.com>2017-12-18 20:35:15 -0200
commit5c0271eed748e18dc4bbf48276587991f77e6750 (patch)
treed11ef0e9ece11aa839d3cbc5ea37f86a100418e7 /editor
parentd81bd965b6d9d47fd4f93a6e7fa0a12a875ba1e8 (diff)
Fix doc methods not showing up
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_help.cpp60
1 files changed, 28 insertions, 32 deletions
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index d20b55e268..5c6cbd1f66 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -947,7 +947,6 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
class_desc->add_newline();
}
- bool method_descr = false;
bool sort_methods = EditorSettings::get_singleton()->get("text_editor/help/sort_functions_alphabetically");
Vector<DocData::MethodDoc> methods;
@@ -1410,43 +1409,40 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
}
}
- if (method_descr) {
-
- section_line.push_back(Pair<String, int>(TTR("Methods"), class_desc->get_line_count() - 2));
- class_desc->push_color(title_color);
- class_desc->push_font(doc_title_font);
- class_desc->add_text(TTR("Method Description:"));
- class_desc->pop();
- class_desc->pop();
-
- class_desc->add_newline();
- class_desc->add_newline();
+ section_line.push_back(Pair<String, int>(TTR("Methods"), class_desc->get_line_count() - 2));
+ class_desc->push_color(title_color);
+ class_desc->push_font(doc_title_font);
+ class_desc->add_text(TTR("Method Description:"));
+ class_desc->pop();
+ class_desc->pop();
- for (int i = 0; i < methods.size(); i++) {
+ class_desc->add_newline();
+ class_desc->add_newline();
- _add_method(methods[i], false);
+ for (int i = 0; i < methods.size(); i++) {
- class_desc->add_newline();
- class_desc->push_color(text_color);
- class_desc->push_font(doc_font);
- class_desc->push_indent(1);
- if (methods[i].description.strip_edges() != String()) {
- _add_text(methods[i].description);
- } else {
- class_desc->add_image(get_icon("Error", "EditorIcons"));
- class_desc->add_text(" ");
- class_desc->push_color(comment_color);
- class_desc->append_bbcode(TTR("There is currently no description for this method. Please help us by [color=$color][url=$url]contributing one[/url][/color]!").replace("$url", CONTRIBUTE_URL).replace("$color", link_color_text));
- class_desc->pop();
- }
+ _add_method(methods[i], false);
+ class_desc->add_newline();
+ class_desc->push_color(text_color);
+ class_desc->push_font(doc_font);
+ class_desc->push_indent(1);
+ if (methods[i].description.strip_edges() != String()) {
+ _add_text(methods[i].description);
+ } else {
+ class_desc->add_image(get_icon("Error", "EditorIcons"));
+ class_desc->add_text(" ");
+ class_desc->push_color(comment_color);
+ class_desc->append_bbcode(TTR("There is currently no description for this method. Please help us by [color=$color][url=$url]contributing one[/url][/color]!").replace("$url", CONTRIBUTE_URL).replace("$color", link_color_text));
class_desc->pop();
- class_desc->pop();
- class_desc->pop();
- class_desc->add_newline();
- class_desc->add_newline();
- class_desc->add_newline();
}
+
+ class_desc->pop();
+ class_desc->pop();
+ class_desc->pop();
+ class_desc->add_newline();
+ class_desc->add_newline();
+ class_desc->add_newline();
}
scroll_locked = false;