Merge pull request #76105 from anvilfolk/tooltip
Fix @export variable tooltips not showing up in Inspector in scripts with inner classes
This commit is contained in:
commit
8cc1762398
1 changed files with 6 additions and 2 deletions
|
@ -2783,7 +2783,9 @@ void EditorInspector::update_tree() {
|
||||||
// Update the docs reference and the label based on the script.
|
// Update the docs reference and the label based on the script.
|
||||||
Vector<DocData::ClassDoc> docs = scr->get_documentation();
|
Vector<DocData::ClassDoc> docs = scr->get_documentation();
|
||||||
if (!docs.is_empty()) {
|
if (!docs.is_empty()) {
|
||||||
doc_name = docs[0].name;
|
// The documentation of a GDScript's main class is at the end of the array.
|
||||||
|
// Hacky because this isn't necessarily always guaranteed.
|
||||||
|
doc_name = docs[docs.size() - 1].name;
|
||||||
}
|
}
|
||||||
if (script_name != StringName()) {
|
if (script_name != StringName()) {
|
||||||
label = script_name;
|
label = script_name;
|
||||||
|
@ -3132,7 +3134,9 @@ void EditorInspector::update_tree() {
|
||||||
if (scr.is_valid()) {
|
if (scr.is_valid()) {
|
||||||
Vector<DocData::ClassDoc> docs = scr->get_documentation();
|
Vector<DocData::ClassDoc> docs = scr->get_documentation();
|
||||||
if (!docs.is_empty()) {
|
if (!docs.is_empty()) {
|
||||||
classname = docs[0].name;
|
// The documentation of a GDScript's main class is at the end of the array.
|
||||||
|
// Hacky because this isn't necessarily always guaranteed.
|
||||||
|
classname = docs[docs.size() - 1].name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue