diff options
author | Paulb23 <p_batty@hotmail.co.uk> | 2018-08-14 23:44:55 +0100 |
---|---|---|
committer | Paulb23 <p_batty@hotmail.co.uk> | 2018-08-14 23:44:55 +0100 |
commit | 81bf150cdc2bd58f07a0420fb47aa2956037ae4d (patch) | |
tree | c68ccc85e396eb925d607be2aecc7210a8867a04 /editor | |
parent | b4f579b5ba8df8b8972c79a10b6d9c8b0719829f (diff) |
Fix re-opening of TextFiles when its already being edited
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 7d72537e32..02c51a2d80 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -1937,7 +1937,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) { |