1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Fix GDScript docs not updating when modified externally

This commit is contained in:
ocean
2024-10-01 15:44:15 -04:00
parent f4af8201ba
commit 0ad55e964f
2 changed files with 11 additions and 14 deletions

View File

@@ -2089,12 +2089,11 @@ void EditorFileSystem::_update_script_documentation() {
// return the last loaded version of the script (without the modifications).
scr->reload_from_file();
}
Vector<DocData::ClassDoc> docs = scr->get_documentation();
for (int j = 0; j < docs.size(); j++) {
EditorHelp::get_doc_data()->add_doc(docs[j]);
for (const DocData::ClassDoc &cd : scr->get_documentation()) {
EditorHelp::get_doc_data()->add_doc(cd);
if (!first_scan) {
// Update the documentation in the Script Editor if it is open.
ScriptEditor::get_singleton()->update_doc(docs[j].name);
ScriptEditor::get_singleton()->update_doc(cd.name);
}
}
}