You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Merge pull request #92280 from dalexeev/editor-fix-built-in-script-documentation
Editor: Fix documentation for built-in scripts
This commit is contained in:
@@ -1048,7 +1048,7 @@ void ScriptEditor::_resave_scripts(const String &p_str) {
|
||||
Ref<Resource> scr = se->get_edited_resource();
|
||||
|
||||
if (scr->is_built_in()) {
|
||||
continue; //internal script, who cares
|
||||
continue; // Internal script, who cares.
|
||||
}
|
||||
|
||||
if (trim_trailing_whitespace_on_save) {
|
||||
@@ -1128,10 +1128,9 @@ void ScriptEditor::_mark_built_in_scripts_as_saved(const String &p_parent_path)
|
||||
Ref<Script> scr = edited_res;
|
||||
if (scr.is_valid()) {
|
||||
trigger_live_script_reload(scr->get_path());
|
||||
|
||||
if (scr->is_tool()) {
|
||||
scr->reload(true);
|
||||
}
|
||||
clear_docs_from_script(scr);
|
||||
scr->reload(true);
|
||||
update_docs_from_script(scr);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1193,7 +1192,7 @@ bool ScriptEditor::_test_script_times_on_disk(Ref<Resource> p_for_script) {
|
||||
}
|
||||
|
||||
if (edited_res->is_built_in()) {
|
||||
continue; //internal script, who cares
|
||||
continue; // Internal script, who cares.
|
||||
}
|
||||
|
||||
uint64_t last_date = se->edited_file_data.last_modified_time;
|
||||
@@ -2770,24 +2769,21 @@ void ScriptEditor::save_all_scripts() {
|
||||
se->apply_code();
|
||||
}
|
||||
|
||||
Ref<Script> scr = edited_res;
|
||||
|
||||
if (scr.is_valid()) {
|
||||
clear_docs_from_script(scr);
|
||||
}
|
||||
|
||||
if (!edited_res->is_built_in()) {
|
||||
Ref<TextFile> text_file = edited_res;
|
||||
Ref<Script> scr = edited_res;
|
||||
|
||||
if (text_file.is_valid()) {
|
||||
_save_text_file(text_file, text_file->get_path());
|
||||
continue;
|
||||
}
|
||||
|
||||
if (scr.is_valid()) {
|
||||
clear_docs_from_script(scr);
|
||||
}
|
||||
|
||||
EditorNode::get_singleton()->save_resource(edited_res); //external script, save it
|
||||
|
||||
if (scr.is_valid()) {
|
||||
update_docs_from_script(scr);
|
||||
}
|
||||
// External script, save it.
|
||||
EditorNode::get_singleton()->save_resource(edited_res);
|
||||
} else {
|
||||
// For built-in scripts, save their scenes instead.
|
||||
const String scene_path = edited_res->get_path().get_slice("::", 0);
|
||||
@@ -2795,6 +2791,10 @@ void ScriptEditor::save_all_scripts() {
|
||||
scenes_to_save.insert(scene_path);
|
||||
}
|
||||
}
|
||||
|
||||
if (scr.is_valid()) {
|
||||
update_docs_from_script(scr);
|
||||
}
|
||||
}
|
||||
|
||||
if (!scenes_to_save.is_empty()) {
|
||||
|
||||
Reference in New Issue
Block a user