@@ -431,7 +431,7 @@ String ScriptEditor::_get_debug_tooltip(const String &p_text, Node *_se) {
431
431
}
432
432
433
433
void ScriptEditor::_breaked (bool p_breaked, bool p_can_debug) {
434
- if (bool ( EDITOR_GET ( " text_editor/external/use_external_editor " )) ) {
434
+ if (external_editor_active ) {
435
435
return ;
436
436
}
437
437
@@ -2264,7 +2264,7 @@ bool ScriptEditor::edit(const Ref<Resource> &p_resource, int p_line, int p_col,
2264
2264
2265
2265
// Don't open dominant script if using an external editor.
2266
2266
bool use_external_editor =
2267
- EDITOR_GET ( " text_editor/external/use_external_editor " ) ||
2267
+ external_editor_active ||
2268
2268
(scr.is_valid () && scr->get_language ()->overrides_external_editor ());
2269
2269
use_external_editor = use_external_editor && !(scr.is_valid () && scr->is_built_in ()); // Ignore external editor for built-in scripts.
2270
2270
const bool open_dominant = EDITOR_GET (" text_editor/behavior/files/open_dominant_script_on_scene_change" );
@@ -2596,6 +2596,9 @@ void ScriptEditor::apply_scripts() const {
2596
2596
}
2597
2597
2598
2598
void ScriptEditor::reload_scripts (bool p_refresh_only) {
2599
+ if (external_editor_active) {
2600
+ return ;
2601
+ }
2599
2602
for (int i = 0 ; i < tab_container->get_tab_count (); i++) {
2600
2603
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_tab_control (i));
2601
2604
if (!se) {
@@ -2763,6 +2766,7 @@ void ScriptEditor::_editor_settings_changed() {
2763
2766
2764
2767
members_overview_enabled = EDITOR_GET (" text_editor/script_list/show_members_overview" );
2765
2768
help_overview_enabled = EDITOR_GET (" text_editor/help/show_help_index" );
2769
+ external_editor_active = EDITOR_GET (" text_editor/external/use_external_editor" );
2766
2770
_update_members_overview_visibility ();
2767
2771
_update_help_overview_visibility ();
2768
2772
@@ -3559,7 +3563,7 @@ TypedArray<ScriptEditorBase> ScriptEditor::_get_open_script_editors() const {
3559
3563
void ScriptEditor::set_scene_root_script (Ref<Script> p_script) {
3560
3564
// Don't open dominant script if using an external editor.
3561
3565
bool use_external_editor =
3562
- EDITOR_GET ( " text_editor/external/use_external_editor " ) ||
3566
+ external_editor_active ||
3563
3567
(p_script.is_valid () && p_script->get_language ()->overrides_external_editor ());
3564
3568
use_external_editor = use_external_editor && !(p_script.is_valid () && p_script->is_built_in ()); // Ignore external editor for built-in scripts.
3565
3569
const bool open_dominant = EDITOR_GET (" text_editor/behavior/files/open_dominant_script_on_scene_change" );
@@ -3827,6 +3831,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
3827
3831
waiting_update_names = false ;
3828
3832
pending_auto_reload = false ;
3829
3833
auto_reload_running_scripts = true ;
3834
+ external_editor_active = false ;
3830
3835
members_overview_enabled = EDITOR_GET (" text_editor/script_list/show_members_overview" );
3831
3836
help_overview_enabled = EDITOR_GET (" text_editor/help/show_help_index" );
3832
3837
0 commit comments