Skip to content

Commit

Permalink
Import zip via drag and drop in project manager.
Browse files Browse the repository at this point in the history
Dropping a single ZIP file in the project manager will now prompt the
import dialog.
  • Loading branch information
Faless committed Feb 3, 2021
1 parent 3115ac4 commit 3629617
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions editor/project_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2326,6 +2326,11 @@ void ProjectManager::_install_project(const String &p_zip_path, const String &p_
}

void ProjectManager::_files_dropped(PoolStringArray p_files, int p_screen) {
if (p_files.size() == 1 && p_files[0].ends_with(".zip")) {
const String file = p_files[0].get_file();
_install_project(p_files[0], file.substr(0, file.length() - 4).capitalize());
return;
}
Set<String> folders_set;
DirAccess *da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
for (int i = 0; i < p_files.size(); i++) {
Expand Down

0 comments on commit 3629617

Please sign in to comment.