Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing tooltips caused by export_category #68641

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions editor/editor_inspector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2723,6 +2723,16 @@ void EditorInspector::update_tree() {
section_depth = 0;

if (!show_categories) {
// Find the class name to retrieve information about the following properties. (The category name does not always work.)
if (doc_name == "" && !EditorNode::get_editor_data().is_type_recognized(p.name) && p.hint_string.length() && FileAccess::exists(p.hint_string)) {
Ref<Script> scr = ResourceLoader::load(p.hint_string, "Script");
if (scr.is_valid()) {
Vector<DocData::ClassDoc> docs = scr->get_documentation();
if (!docs.is_empty()) {
doc_name = docs[0].name;
}
}
}
continue;
}

Expand Down
1 change: 1 addition & 0 deletions modules/gdscript/gdscript_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3853,6 +3853,7 @@ bool GDScriptParser::export_group_annotations(const AnnotationNode *p_annotation
switch (t_usage) {
case PROPERTY_USAGE_CATEGORY: {
annotation->export_info.usage = t_usage;
annotation->export_info.hint_string = script_path;
} break;

case PROPERTY_USAGE_GROUP: {
Expand Down