summaryrefslogtreecommitdiff
path: root/editor/property_editor.cpp
diff options
context:
space:
mode:
authorcarlosfvieira <carlos.vieira@gmail.com>2017-12-15 16:28:22 +0000
committerCarlos Vieira <carlos.vieira@flintbee.com>2017-12-16 00:24:39 +0000
commit30acd5f83490851e6a1bfa2704bda4b187238ee3 (patch)
tree7662a8cb333539a6083a8c1902c6ea4beb42e5e2 /editor/property_editor.cpp
parent72d5ae84b30c805692e132e2103e14e6cc304e34 (diff)
closes godotengine/godot#6382 - traverse classes docs so that all properties from inherited classes have tooltips accordingly
Diffstat (limited to 'editor/property_editor.cpp')
-rw-r--r--editor/property_editor.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index d22bee40d9..3369ad67c6 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -2952,14 +2952,19 @@ void PropertyEditor::update_tree() {
if (!found) {
DocData *dd = EditorHelp::get_doc_data();
Map<String, DocData::ClassDoc>::Element *E = dd->class_list.find(classname);
- if (E) {
+ while (E && descr == String()) {
for (int i = 0; i < E->get().properties.size(); i++) {
if (E->get().properties[i].name == propname.operator String()) {
descr = E->get().properties[i].description.strip_edges().word_wrap(80);
+ break;
}
}
+ if (!E->get().inherits.empty()) {
+ E = dd->class_list.find(E->get().inherits);
+ } else {
+ break;
+ }
}
-
descr_cache[classname][propname] = descr;
}