summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-08-15 23:16:19 +0200
committerGitHub <noreply@github.com>2018-08-15 23:16:19 +0200
commit1c17c2b9b39d9c6e7440d25251ac8b1a1fede5bb (patch)
treefad544468c060e750dd62adaafe62378d1e96e64 /editor
parentbec8c7770cb63b6f33dc42e0da77aafd594fbcbe (diff)
parent81bf150cdc2bd58f07a0420fb47aa2956037ae4d (diff)
Merge pull request #21023 from Paulb23/fix_reopening_text_file
Fix re-opening of TextFiles when its already being edited.
Diffstat (limited to 'editor')
-rw-r--r--editor/plugins/script_editor_plugin.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 8f1640b6d1..1bb7c98114 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -1959,7 +1959,7 @@ bool ScriptEditor::edit(const RES &p_resource, int p_line, int p_col, bool p_gra
if (!se)
continue;
- if (se->get_edited_resource() == p_resource) {
+ if ((script != NULL && se->get_edited_resource() == p_resource) || se->get_edited_resource()->get_path() == p_resource->get_path()) {
if (should_open) {
if (tab_container->get_current_tab() != i) {