diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2016-07-31 20:16:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-31 20:16:12 +0200 |
commit | c788284b5c24cacdddd50fef362a419f18809017 (patch) | |
tree | 80ae4a563f0a4e56cd307124eb7f7fbe644f9a9d /tools/editor | |
parent | 3ca08d2a0fc48ac5e073fe586ae47d1fbcda47e2 (diff) | |
parent | 5e011dcd0e4958f6bc59f64e024402af1ad1dc0d (diff) |
Merge pull request #5981 from profelis/PR-scan-dragged-folder
Drag open scan window if engine.cfg not found
Diffstat (limited to 'tools/editor')
-rw-r--r-- | tools/editor/project_manager.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/editor/project_manager.cpp b/tools/editor/project_manager.cpp index f885fbba07..daba5c9eba 100644 --- a/tools/editor/project_manager.cpp +++ b/tools/editor/project_manager.cpp @@ -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() { |