| 3962 | } |
| 3963 | |
| 3964 | void ScriptEditor::set_scene_root_script(Ref<Script> p_script) { |
| 3965 | // Don't open dominant script if using an external editor. |
| 3966 | bool use_external_editor = |
| 3967 | external_editor_active || |
| 3968 | (p_script.is_valid() && p_script->get_language()->overrides_external_editor()); |
| 3969 | use_external_editor = use_external_editor && !(p_script.is_valid() && p_script->is_built_in()); // Ignore external editor for built-in scripts. |
| 3970 | const bool open_dominant = EDITOR_GET("text_editor/behavior/files/open_dominant_script_on_scene_change"); |
| 3971 | |
| 3972 | if (open_dominant && !use_external_editor && p_script.is_valid()) { |
| 3973 | edit(p_script); |
| 3974 | } |
| 3975 | } |
| 3976 | |
| 3977 | bool ScriptEditor::script_goto_method(Ref<Script> p_script, const String &p_method) { |
| 3978 | int line = p_script->get_member_line(p_method); |
no test coverage detected