| 161 | } |
| 162 | |
| 163 | void ScriptTextEditor::set_edited_resource(const Ref<Resource> &p_res) { |
| 164 | ERR_FAIL_COND(script.is_valid()); |
| 165 | ERR_FAIL_COND(p_res.is_null()); |
| 166 | |
| 167 | script = p_res; |
| 168 | |
| 169 | code_editor->get_text_editor()->set_text(script->get_source_code()); |
| 170 | code_editor->get_text_editor()->clear_undo_history(); |
| 171 | code_editor->get_text_editor()->tag_saved_version(); |
| 172 | |
| 173 | emit_signal(SNAME("name_changed")); |
| 174 | code_editor->update_line_and_column(); |
| 175 | } |
| 176 | |
| 177 | void ScriptTextEditor::enable_editor(Control *p_shortcut_context) { |
| 178 | if (editor_enabled) { |
nothing calls this directly
no test coverage detected