diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index f866bd2a012..5ba0f467349 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -445,7 +445,7 @@ String ScriptEditor::_get_debug_tooltip(const String &p_text, Node *_se) { } void ScriptEditor::_breaked(bool p_breaked, bool p_can_debug) { - if (bool(EDITOR_GET("text_editor/external/use_external_editor"))) { + if (external_editor_active) { return; } @@ -2278,7 +2278,7 @@ bool ScriptEditor::edit(const Ref &p_resource, int p_line, int p_col, // Don't open dominant script if using an external editor. bool use_external_editor = - EDITOR_GET("text_editor/external/use_external_editor") || + external_editor_active || (scr.is_valid() && scr->get_language()->overrides_external_editor()); use_external_editor = use_external_editor && !(scr.is_valid() && scr->is_built_in()); // Ignore external editor for built-in scripts. const bool open_dominant = EDITOR_GET("text_editor/behavior/files/open_dominant_script_on_scene_change"); @@ -2608,6 +2608,9 @@ void ScriptEditor::apply_scripts() const { } void ScriptEditor::reload_scripts(bool p_refresh_only) { + if (external_editor_active) { + return; + } for (int i = 0; i < tab_container->get_tab_count(); i++) { ScriptEditorBase *se = Object::cast_to(tab_container->get_tab_control(i)); if (!se) { @@ -2775,6 +2778,7 @@ void ScriptEditor::_editor_settings_changed() { members_overview_enabled = EDITOR_GET("text_editor/script_list/show_members_overview"); help_overview_enabled = EDITOR_GET("text_editor/help/show_help_index"); + external_editor_active = EDITOR_GET("text_editor/external/use_external_editor"); _update_members_overview_visibility(); _update_help_overview_visibility(); @@ -3571,7 +3575,7 @@ TypedArray ScriptEditor::_get_open_script_editors() const { void ScriptEditor::set_scene_root_script(Ref