mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-07 12:54:00 +00:00
Launcher: Fix Insert Above behavior when the directory is added automatically
This commit is contained in:
parent
5711a395af
commit
f393c40cbd
@ -714,9 +714,8 @@ void Launcher::DataFilesPage::addSubdirectories(bool append)
|
||||
// Automatically add the directory selected by user
|
||||
if (!ui.directoryListWidget->findItems(rootPath, Qt::MatchFixedString).isEmpty())
|
||||
return;
|
||||
ui.directoryListWidget->addItem(rootPath);
|
||||
auto row = ui.directoryListWidget->count() - 1;
|
||||
auto* item = ui.directoryListWidget->item(row);
|
||||
ui.directoryListWidget->insertItem(selectedRow, rootPath);
|
||||
auto* item = ui.directoryListWidget->item(selectedRow);
|
||||
item->setData(Qt::UserRole, QVariant::fromValue(Config::SettingValue{ rootPath }));
|
||||
mNewDataDirs.push_back(rootPath);
|
||||
refreshDataFilesView();
|
||||
|
Loading…
Reference in New Issue
Block a user