summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-07-27 11:13:01 +0200
committerGitHub <noreply@github.com>2020-07-27 11:13:01 +0200
commita5c0ee012883ff2a0b97f7222fce853bb75d2eba (patch)
tree05d0cb3a4ce287438636415d2f23d10d873b7c84 /editor/plugins
parent4fdc3e683a2121d280de5a91c0e46467963e523d (diff)
parent6b3f013a82557624aac49b567f4a8139848aa40e (diff)
Merge pull request #40746 from akien-mga/no-dominion-outside-borders
Script editor: Fix open dominant logic for language-specific external editors
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/script_editor_plugin.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 713d57ee95..edce2023ff 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -2092,7 +2092,9 @@ bool ScriptEditor::edit(const RES &p_resource, int p_line, int p_col, bool p_gra
Ref<Script> script = p_resource;
// Don't open dominant script if using an external editor.
- const bool use_external_editor = EditorSettings::get_singleton()->get("text_editor/external/use_external_editor");
+ const bool use_external_editor =
+ EditorSettings::get_singleton()->get("text_editor/external/use_external_editor") ||
+ script->get_language()->overrides_external_editor();
const bool open_dominant = EditorSettings::get_singleton()->get("text_editor/files/open_dominant_script_on_scene_change");
const bool should_open = (open_dominant && !use_external_editor) || !EditorNode::get_singleton()->is_changing_scene();
@@ -3001,7 +3003,9 @@ Array ScriptEditor::_get_open_script_editors() const {
void ScriptEditor::set_scene_root_script(Ref<Script> p_script) {
// Don't open dominant script if using an external editor.
- const bool use_external_editor = EditorSettings::get_singleton()->get("text_editor/external/use_external_editor");
+ const bool use_external_editor =
+ EditorSettings::get_singleton()->get("text_editor/external/use_external_editor") ||
+ p_script->get_language()->overrides_external_editor();
const bool open_dominant = EditorSettings::get_singleton()->get("text_editor/files/open_dominant_script_on_scene_change");
if (open_dominant && !use_external_editor && p_script.is_valid()) {