From b7b8f8645fa1051be4cc009f2f0e6ab4d89fee07 Mon Sep 17 00:00:00 2001 From: Stijn Hinlopen Date: Mon, 29 Jun 2020 01:04:28 +0200 Subject: [PATCH] Open scene selected from Quick Open dialog. (cherry picked from commit 1ce3a77a42fc92c278466c30b56b43673941c769) --- editor/editor_node.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index b19ccbefc20..e3d923dd5e7 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -3705,10 +3705,14 @@ void EditorNode::_quick_opened() { Vector files = quick_open->get_selected_files(); + bool open_scene_dialog = quick_open->get_base_type() == "PackedScene"; for (int i = 0; i < files.size(); i++) { String res_path = files[i]; - if (quick_open->get_base_type() == "PackedScene") { + List scene_extensions; + ResourceLoader::get_recognized_extensions_for_type("PackedScene", &scene_extensions); + + if (open_scene_dialog || scene_extensions.find(files[i].get_extension())) { open_request(res_path); } else { load_resource(res_path);