Merge pull request #21023 from Paulb23/fix_reopening_text_file

Fix re-opening of TextFiles when its already being edited.
This commit is contained in:
Rémi Verschelde 2018-08-15 23:16:19 +02:00 committed by GitHub
commit 1c17c2b9b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {