diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2016-10-30 12:17:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-30 12:17:28 +0100 |
commit | 914015f3b63dd956e72ea937d46ea4b2db005ada (patch) | |
tree | 9c1f1b641f9d83e59065140e1ad112d33836a894 | |
parent | 21828209ec04807c9539dd5acc20de7d14033f37 (diff) | |
parent | 13c92099e64ddf19978f8a53c66d3e44f5ec5922 (diff) | |
download | redot-engine-914015f3b63dd956e72ea937d46ea4b2db005ada.tar.gz |
Merge pull request #6962 from henriquelalves/external_editor_focus_bug
Won't change editor tabs when using External Editor.
-rw-r--r-- | tools/editor/editor_node.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index c17cf05ea7..5a3deb7b9d 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -101,6 +101,7 @@ #include "plugins/collision_shape_2d_editor_plugin.h" #include "main/input_default.h" // end +#include "tools/editor/editor_settings.h" #include "tools/editor/io_plugins/editor_texture_import_plugin.h" #include "tools/editor/io_plugins/editor_scene_import_plugin.h" #include "tools/editor/io_plugins/editor_font_import_plugin.h" @@ -1666,12 +1667,15 @@ void EditorNode::_edit_current() { if (main_plugin) { - if (main_plugin!=editor_plugin_screen && (!ScriptEditor::get_singleton() || !ScriptEditor::get_singleton()->is_visible() || ScriptEditor::get_singleton()->can_take_away_focus())) { + // special case if use of external editor is true + if (main_plugin->get_name() == "Script" && bool(EditorSettings::get_singleton()->get("external_editor/use_external_editor"))){ + main_plugin->edit(current_obj); + } + else if (main_plugin!=editor_plugin_screen && (!ScriptEditor::get_singleton() || !ScriptEditor::get_singleton()->is_visible() || ScriptEditor::get_singleton()->can_take_away_focus())) { // update screen main_plugin if (!changing_scene) { - if (editor_plugin_screen) editor_plugin_screen->make_visible(false); editor_plugin_screen=main_plugin; |