Преглед изворни кода

Properly handle scenes in Find in Files

kobewi пре 3 година
родитељ
комит
31644fe280
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      editor/plugins/script_editor_plugin.cpp

+ 3 - 0
editor/plugins/script_editor_plugin.cpp

@@ -3434,6 +3434,9 @@ void ScriptEditor::_on_find_in_files_result_selected(String fpath, int line_numb
 			shader_editor->make_visible(true);
 			shader_editor->make_visible(true);
 			shader_editor->get_shader_editor()->goto_line_selection(line_number - 1, begin, end);
 			shader_editor->get_shader_editor()->goto_line_selection(line_number - 1, begin, end);
 			return;
 			return;
+		} else if (fpath.get_extension() == "tscn") {
+			editor->load_scene(fpath);
+			return;
 		} else {
 		} else {
 			Ref<Script> script = res;
 			Ref<Script> script = res;
 			if (script.is_valid()) {
 			if (script.is_valid()) {