mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 15:29:55 +00:00
Always set userrole for archive list
This commit is contained in:
parent
e735bf67e1
commit
47ef2d018f
1 changed files with 3 additions and 3 deletions
|
@ -867,9 +867,8 @@ bool Launcher::DataFilesPage::moveArchive(QListWidgetItem* listItem, int step)
|
|||
if (selectedRow == -1 || newRow < 0 || newRow > ui.archiveListWidget->count() - 1)
|
||||
return false;
|
||||
|
||||
const QListWidgetItem* item = ui.archiveListWidget->takeItem(selectedRow);
|
||||
|
||||
addArchive(item->text(), item->checkState(), newRow);
|
||||
QListWidgetItem* item = ui.archiveListWidget->takeItem(selectedRow);
|
||||
ui.archiveListWidget->insertItem(newRow, item);
|
||||
ui.archiveListWidget->setCurrentRow(newRow);
|
||||
return true;
|
||||
}
|
||||
|
@ -880,6 +879,7 @@ void Launcher::DataFilesPage::addArchive(const QString& name, Qt::CheckState sel
|
|||
row = ui.archiveListWidget->count();
|
||||
ui.archiveListWidget->insertItem(row, name);
|
||||
ui.archiveListWidget->item(row)->setCheckState(selected);
|
||||
ui.archiveListWidget->item(row)->setData(Qt::UserRole, QVariant::fromValue(Config::SettingValue{ name }));
|
||||
if (mKnownArchives.filter(name).isEmpty()) // XXX why contains doesn't work here ???
|
||||
{
|
||||
auto item = ui.archiveListWidget->item(row);
|
||||
|
|
Loading…
Reference in a new issue