Merge pull request #5981 from profelis/PR-scan-dragged-folder

Drag open scan window if engine.cfg not found
This commit is contained in:
Rémi Verschelde 2016-07-31 20:16:12 +02:00 committed by GitHub
commit c788284b5c
1 changed files with 6 additions and 0 deletions

View File

@ -1103,11 +1103,17 @@ void ProjectManager::_install_project(const String& p_zip_path,const String& p_t
}
void ProjectManager::_files_dropped(StringArray p_files, int p_screen) {
bool import_project_file = false;
for (int i = 0; i < p_files.size(); i++) {
if (p_files[i].ends_with("engine.cfg")) {
npdialog->import_from_file(p_files[i]);
import_project_file = true;
}
}
if (!import_project_file && p_files.size() > 0) {
scan_dir->set_current_dir(p_files[0]);
scan_dir->popup_centered_ratio();
}
}
void ProjectManager::_bind_methods() {