diff options
author | Stijn Hinlopen <f.a.hinlopen@gmail.com> | 2020-06-29 01:04:28 +0200 |
---|---|---|
committer | Stijn Hinlopen <f.a.hinlopen@gmail.com> | 2020-06-29 16:36:12 +0200 |
commit | 1ce3a77a42fc92c278466c30b56b43673941c769 (patch) | |
tree | 77a9b37b87ef7052eac30a249e39ce865c98479f | |
parent | 4599381fad10a20ffd2d4eadf7e9de99ef15ac80 (diff) |
Open scene selected from Quick Open dialog.
-rw-r--r-- | editor/editor_node.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index f2f8805aaf..5da19abac3 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -3411,10 +3411,14 @@ void EditorNode::_update_recent_scenes() { void EditorNode::_quick_opened() { Vector<String> 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<String> 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); |