summaryrefslogtreecommitdiff
path: root/editor/editor_node.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-07-01 16:44:54 +0200
committerGitHub <noreply@github.com>2020-07-01 16:44:54 +0200
commit117e0106ea22bec1f4f4d8a644e2506b8610cb06 (patch)
treeaa51715c8bfd8445b9e0a251da523c9a32c860d1 /editor/editor_node.cpp
parent9000e596502c45b5611768efcd30e76556209717 (diff)
parent1ce3a77a42fc92c278466c30b56b43673941c769 (diff)
Merge pull request #39928 from hinlopen/qo-open-scene
Open scene selected from Quick Open dialog
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r--editor/editor_node.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 43296a7e80..80a1da7827 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);