Merge pull request #81068 from KoBeWi/is_scene_a_resource

Fix Quick Open not opening binary resources
This commit is contained in:
Rémi Verschelde 2023-08-28 15:05:28 +02:00
commit 031f6deefb
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 1 additions and 5 deletions

View File

@ -4025,11 +4025,7 @@ void EditorNode::_quick_opened() {
bool open_scene_dialog = quick_open->get_base_type() == "PackedScene"; bool open_scene_dialog = quick_open->get_base_type() == "PackedScene";
for (int i = 0; i < files.size(); i++) { for (int i = 0; i < files.size(); i++) {
String res_path = files[i]; String res_path = files[i];
if (open_scene_dialog || ClassDB::is_parent_class(ResourceLoader::get_resource_type(res_path), "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().to_lower())) {
open_request(res_path); open_request(res_path);
} else { } else {
load_resource(res_path); load_resource(res_path);