Merge pull request #61016 from macjuul/mono-script-editor-fix

Fix script editor opening when external editor is configured for C#
This commit is contained in:
Rémi Verschelde 2022-05-14 09:19:32 +02:00 committed by GitHub
commit 6d5d9dd82a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2303,7 +2303,7 @@ void EditorNode::_edit_current(bool p_skip_foreign) {
if (main_plugin) {
// Special case if use of external editor is true.
Resource *current_res = Object::cast_to<Resource>(current_obj);
if (main_plugin->get_name() == "Script" && current_obj->is_class("VisualScript") && current_res && !current_res->is_built_in() && (bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor")) || overrides_external_editor(current_obj))) {
if (main_plugin->get_name() == "Script" && !current_obj->is_class("VisualScript") && current_res && !current_res->is_built_in() && (bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor")) || overrides_external_editor(current_obj))) {
if (!changing_scene) {
main_plugin->edit(current_obj);
}