Merge pull request #99453 from reach-satori/drag_to_filesystem_folder

Allow dragging to specific folders in filesystem dock
This commit is contained in:
Rémi Verschelde
2024-12-14 18:25:33 +01:00
3 changed files with 15 additions and 1 deletions

View File

@ -5844,7 +5844,11 @@ PopupMenu *EditorNode::get_export_as_menu() {
}
void EditorNode::_dropped_files(const Vector<String> &p_files) {
String to_path = ProjectSettings::get_singleton()->globalize_path(FileSystemDock::get_singleton()->get_current_directory());
String to_path = FileSystemDock::get_singleton()->get_folder_path_at_mouse_position();
if (to_path.is_empty()) {
to_path = FileSystemDock::get_singleton()->get_current_directory();
}
to_path = ProjectSettings::get_singleton()->globalize_path(to_path);
_add_dropped_files_recursive(p_files, to_path);