|
|
@ -714,9 +714,8 @@ void Launcher::DataFilesPage::addSubdirectories(bool append)
|
|
|
|
// Automatically add the directory selected by user
|
|
|
|
// Automatically add the directory selected by user
|
|
|
|
if (!ui.directoryListWidget->findItems(rootPath, Qt::MatchFixedString).isEmpty())
|
|
|
|
if (!ui.directoryListWidget->findItems(rootPath, Qt::MatchFixedString).isEmpty())
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
ui.directoryListWidget->addItem(rootPath);
|
|
|
|
ui.directoryListWidget->insertItem(selectedRow, rootPath);
|
|
|
|
auto row = ui.directoryListWidget->count() - 1;
|
|
|
|
auto* item = ui.directoryListWidget->item(selectedRow);
|
|
|
|
auto* item = ui.directoryListWidget->item(row);
|
|
|
|
|
|
|
|
item->setData(Qt::UserRole, QVariant::fromValue(Config::SettingValue{ rootPath }));
|
|
|
|
item->setData(Qt::UserRole, QVariant::fromValue(Config::SettingValue{ rootPath }));
|
|
|
|
mNewDataDirs.push_back(rootPath);
|
|
|
|
mNewDataDirs.push_back(rootPath);
|
|
|
|
refreshDataFilesView();
|
|
|
|
refreshDataFilesView();
|
|
|
|