@@ -445,7 +445,7 @@ String ScriptEditor::_get_debug_tooltip(const String &p_text, Node *_se) {
445
445
}
446
446
447
447
void ScriptEditor::_breaked (bool p_breaked, bool p_can_debug) {
448
- if (bool ( EDITOR_GET ( " text_editor/external/use_external_editor " )) ) {
448
+ if (external_editor_active ) {
449
449
return ;
450
450
}
451
451
@@ -2278,7 +2278,7 @@ bool ScriptEditor::edit(const Ref<Resource> &p_resource, int p_line, int p_col,
2278
2278
2279
2279
// Don't open dominant script if using an external editor.
2280
2280
bool use_external_editor =
2281
- EDITOR_GET ( " text_editor/external/use_external_editor " ) ||
2281
+ external_editor_active ||
2282
2282
(scr.is_valid () && scr->get_language ()->overrides_external_editor ());
2283
2283
use_external_editor = use_external_editor && !(scr.is_valid () && scr->is_built_in ()); // Ignore external editor for built-in scripts.
2284
2284
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 {
2608
2608
}
2609
2609
2610
2610
void ScriptEditor::reload_scripts (bool p_refresh_only) {
2611
+ if (external_editor_active) {
2612
+ return ;
2613
+ }
2611
2614
for (int i = 0 ; i < tab_container->get_tab_count (); i++) {
2612
2615
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_tab_control (i));
2613
2616
if (!se) {
@@ -2775,6 +2778,7 @@ void ScriptEditor::_editor_settings_changed() {
2775
2778
2776
2779
members_overview_enabled = EDITOR_GET (" text_editor/script_list/show_members_overview" );
2777
2780
help_overview_enabled = EDITOR_GET (" text_editor/help/show_help_index" );
2781
+ external_editor_active = EDITOR_GET (" text_editor/external/use_external_editor" );
2778
2782
_update_members_overview_visibility ();
2779
2783
_update_help_overview_visibility ();
2780
2784
@@ -3571,7 +3575,7 @@ TypedArray<ScriptEditorBase> ScriptEditor::_get_open_script_editors() const {
3571
3575
void ScriptEditor::set_scene_root_script (Ref<Script> p_script) {
3572
3576
// Don't open dominant script if using an external editor.
3573
3577
bool use_external_editor =
3574
- EDITOR_GET ( " text_editor/external/use_external_editor " ) ||
3578
+ external_editor_active ||
3575
3579
(p_script.is_valid () && p_script->get_language ()->overrides_external_editor ());
3576
3580
use_external_editor = use_external_editor && !(p_script.is_valid () && p_script->is_built_in ()); // Ignore external editor for built-in scripts.
3577
3581
const bool open_dominant = EDITOR_GET (" text_editor/behavior/files/open_dominant_script_on_scene_change" );
@@ -3839,6 +3843,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
3839
3843
waiting_update_names = false ;
3840
3844
pending_auto_reload = false ;
3841
3845
auto_reload_running_scripts = true ;
3846
+ external_editor_active = false ;
3842
3847
members_overview_enabled = EDITOR_GET (" text_editor/script_list/show_members_overview" );
3843
3848
help_overview_enabled = EDITOR_GET (" text_editor/help/show_help_index" );
3844
3849
0 commit comments