Fixed #4606 (GUI: Allows selection of multiple directories then does nothing)
This commit is contained in:
parent
c96586b2a9
commit
4f76f8f558
|
@ -416,11 +416,15 @@ QStringList MainWindow::SelectFilesToCheck(QFileDialog::FileMode mode)
|
||||||
}
|
}
|
||||||
FormatAndSetTitle();
|
FormatAndSetTitle();
|
||||||
} else if (mode == QFileDialog::DirectoryOnly) {
|
} else if (mode == QFileDialog::DirectoryOnly) {
|
||||||
QString dir = QFileDialog::getExistingDirectory(this,
|
QFileDialog dialog;
|
||||||
tr("Select directory to check"),
|
dialog.setFileMode(mode);
|
||||||
GetPath(SETTINGS_LAST_CHECK_PATH));
|
dialog.setWindowTitle("Select directory");
|
||||||
if (!dir.isEmpty()) {
|
QStringList dirs;
|
||||||
qDebug() << "Setting current directory to: " << dir;
|
if (dialog.exec())
|
||||||
|
dirs = dialog.selectedFiles();
|
||||||
|
if (!dirs.isEmpty()) {
|
||||||
|
QString dir = dirs[0];
|
||||||
|
qDebug() << "Setting current directory to: " << dirs[0];
|
||||||
mCurrentDirectory = dir;
|
mCurrentDirectory = dir;
|
||||||
selected.append(dir);
|
selected.append(dir);
|
||||||
dir = QDir::toNativeSeparators(dir);
|
dir = QDir::toNativeSeparators(dir);
|
||||||
|
|
Loading…
Reference in New Issue