You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
Applied the same kind of ordering to methods description
Previously, the ordering did not match. This could be improved by doing the filtering behorehand, then we simply access them. This will make sure that future changes to one is reflected to the other (because we are only doing it once)
This commit is contained in:
@@ -1107,10 +1107,20 @@ void EditorHelp::_update_doc() {
|
|||||||
class_desc->add_newline();
|
class_desc->add_newline();
|
||||||
class_desc->add_newline();
|
class_desc->add_newline();
|
||||||
|
|
||||||
|
for (int pass = 0; pass < 2; pass++) {
|
||||||
|
Vector<DocData::MethodDoc> methods_filtered;
|
||||||
|
|
||||||
for (int i = 0; i < methods.size(); i++) {
|
for (int i = 0; i < methods.size(); i++) {
|
||||||
|
const String &q = methods[i].qualifiers;
|
||||||
|
if ((pass == 0 && q.find("virtual") != -1) || (pass == 1 && q.find("virtual") == -1)) {
|
||||||
|
methods_filtered.push_back(methods[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < methods_filtered.size(); i++) {
|
||||||
|
|
||||||
class_desc->push_font(doc_code_font);
|
class_desc->push_font(doc_code_font);
|
||||||
_add_method(methods[i], false);
|
_add_method(methods_filtered[i], false);
|
||||||
class_desc->pop();
|
class_desc->pop();
|
||||||
|
|
||||||
class_desc->add_newline();
|
class_desc->add_newline();
|
||||||
@@ -1119,8 +1129,8 @@ void EditorHelp::_update_doc() {
|
|||||||
class_desc->push_color(text_color);
|
class_desc->push_color(text_color);
|
||||||
class_desc->push_font(doc_font);
|
class_desc->push_font(doc_font);
|
||||||
class_desc->push_indent(1);
|
class_desc->push_indent(1);
|
||||||
if (methods[i].description.strip_edges() != String()) {
|
if (methods_filtered[i].description.strip_edges() != String()) {
|
||||||
_add_text(methods[i].description);
|
_add_text(methods_filtered[i].description);
|
||||||
} else {
|
} else {
|
||||||
class_desc->add_image(get_icon("Error", "EditorIcons"));
|
class_desc->add_image(get_icon("Error", "EditorIcons"));
|
||||||
class_desc->add_text(" ");
|
class_desc->add_text(" ");
|
||||||
@@ -1137,7 +1147,7 @@ void EditorHelp::_update_doc() {
|
|||||||
class_desc->add_newline();
|
class_desc->add_newline();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
scroll_locked = false;
|
scroll_locked = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user