瀏覽代碼

Merge pull request #21023 from Paulb23/fix_reopening_text_file

Fix re-opening of TextFiles when its already being edited.
Rémi Verschelde 7 年之前
父節點
當前提交
1c17c2b9b3
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      editor/plugins/script_editor_plugin.cpp

+ 1 - 1
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) {