summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorIvan Vodopiviz <ivanvodo@gmail.com>2018-03-21 22:23:15 +0100
committerIvan Vodopiviz <ivanvodo@gmail.com>2018-03-21 22:23:15 +0100
commitf5147befb68cc2a021034a55ad64a4e1fae4bba2 (patch)
treea8d2d95e97c846a1e4a5eaa7d51e495e80779845 /editor
parentf2df8c94b2e5ba6c4eee3515d1d30f36194ca803 (diff)
Prevented external editor from running multiple times
Fixes #16923. I'm not a fan of the special case for scripts in editor_node.cpp, but in any case, I made it so it wouldn't make the external editor to re-open just because we switched scenes.
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_node.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 36ea90ed66..94b4754478 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -1599,7 +1599,8 @@ void EditorNode::_edit_current() {
// special case if use of external editor is true
if (main_plugin->get_name() == "Script" && (bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor")) || overrides_external_editor(current_obj))) {
- main_plugin->edit(current_obj);
+ if (!changing_scene)
+ main_plugin->edit(current_obj);
}
else if (main_plugin != editor_plugin_screen && (!ScriptEditor::get_singleton() || !ScriptEditor::get_singleton()->is_visible_in_tree() || ScriptEditor::get_singleton()->can_take_away_focus())) {