mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-24 18:17:21 +01:00
Cast dragged file extension name to lowercase, closes #68104
(cherry picked from commit 07e367cb0b07f02fef92420fde53e05be3d4b247)
This commit is contained in:
parent
15f2a58915
commit
1d8716a903
@ -3792,7 +3792,7 @@ void EditorNode::_quick_opened() {
|
|||||||
List<String> scene_extensions;
|
List<String> scene_extensions;
|
||||||
ResourceLoader::get_recognized_extensions_for_type("PackedScene", &scene_extensions);
|
ResourceLoader::get_recognized_extensions_for_type("PackedScene", &scene_extensions);
|
||||||
|
|
||||||
if (open_scene_dialog || scene_extensions.find(files[i].get_extension())) {
|
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);
|
||||||
|
@ -4301,7 +4301,8 @@ bool SpatialEditorViewport::can_drop_data_fw(const Point2 &p_point, const Varian
|
|||||||
ResourceLoader::get_recognized_extensions_for_type("Mesh", &mesh_extensions);
|
ResourceLoader::get_recognized_extensions_for_type("Mesh", &mesh_extensions);
|
||||||
|
|
||||||
for (int i = 0; i < files.size(); i++) {
|
for (int i = 0; i < files.size(); i++) {
|
||||||
if (mesh_extensions.find(files[i].get_extension()) || scene_extensions.find(files[i].get_extension())) {
|
String extension = files[i].get_extension().to_lower();
|
||||||
|
if (mesh_extensions.find(extension) || scene_extensions.find(extension)) {
|
||||||
RES res = ResourceLoader::load(files[i]);
|
RES res = ResourceLoader::load(files[i]);
|
||||||
if (res.is_null()) {
|
if (res.is_null()) {
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user