Skip to content

Commit

Permalink
Open scene selected from Quick Open dialog.
Browse files Browse the repository at this point in the history
  • Loading branch information
stijn-h committed Jun 29, 2020
1 parent 4599381 commit 1ce3a77
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion editor/editor_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1ce3a77

Please sign in to comment.