Reverted 4f76f8f558 (GUI: wrong multiselection behaviour)

This commit is contained in:
Daniel Marjamäki 2013-09-07 19:38:40 +02:00
parent 51ad747317
commit 2b3e1a28d8
1 changed files with 5 additions and 9 deletions

View File

@ -416,15 +416,11 @@ QStringList MainWindow::SelectFilesToCheck(QFileDialog::FileMode mode)
}
FormatAndSetTitle();
} else if (mode == QFileDialog::DirectoryOnly) {
QFileDialog dialog;
dialog.setFileMode(mode);
dialog.setWindowTitle("Select directory");
QStringList dirs;
if (dialog.exec())
dirs = dialog.selectedFiles();
if (!dirs.isEmpty()) {
QString dir = dirs[0];
qDebug() << "Setting current directory to: " << dirs[0];
QString dir = QFileDialog::getExistingDirectory(this,
tr("Select directory to check"),
GetPath(SETTINGS_LAST_CHECK_PATH));
if (!dir.isEmpty()) {
qDebug() << "Setting current directory to: " << dir;
mCurrentDirectory = dir;
selected.append(dir);
dir = QDir::toNativeSeparators(dir);