| 526 | } |
| 527 | |
| 528 | void ScriptEditor::_goto_script_line(Ref<RefCounted> p_script, int p_line) { |
| 529 | Ref<Script> scr = Object::cast_to<Script>(*p_script); |
| 530 | if (scr.is_valid() && (scr->has_source_code() || scr->get_path().is_resource_file())) { |
| 531 | if (edit(p_script, p_line, 0)) { |
| 532 | EditorNode::get_singleton()->push_item(p_script.ptr()); |
| 533 | |
| 534 | ScriptEditorBase *current = _get_current_editor(); |
| 535 | if (ScriptTextEditor *script_text_editor = Object::cast_to<ScriptTextEditor>(current)) { |
| 536 | script_text_editor->goto_line_centered(p_line); |
| 537 | } else if (current) { |
| 538 | current->goto_line(p_line); |
| 539 | } |
| 540 | |
| 541 | _save_history(); |
| 542 | } |
| 543 | } |
| 544 | } |
| 545 | |
| 546 | void ScriptEditor::_set_execution(Ref<RefCounted> p_script, int p_line) { |
| 547 | Ref<Script> scr = Object::cast_to<Script>(*p_script); |
nothing calls this directly
no test coverage detected