Просмотр исходного кода

Fix re-opening of TextFiles when its already being edited

Paulb23 7 лет назад
Родитель
Сommit
81bf150cdc
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      editor/plugins/script_editor_plugin.cpp

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