fix: don't double add mods in mod downloader/updater
Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
parent
2d10c246a8
commit
1709b47bb7
@ -305,7 +305,7 @@ auto ModUpdateDialog::getTasks() -> const std::list<ModDownloadTask*>
|
|||||||
|
|
||||||
auto* item = ui->modTreeWidget->topLevelItem(0);
|
auto* item = ui->modTreeWidget->topLevelItem(0);
|
||||||
|
|
||||||
for (int i = 0; item != nullptr; ++i) {
|
for (int i = 1; item != nullptr; ++i) {
|
||||||
if (item->checkState(0) == Qt::CheckState::Checked) {
|
if (item->checkState(0) == Qt::CheckState::Checked) {
|
||||||
list.push_back(m_tasks.find(item->text(0)).value());
|
list.push_back(m_tasks.find(item->text(0)).value());
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ auto ReviewMessageBox::deselectedMods() -> QStringList
|
|||||||
|
|
||||||
auto* item = ui->modTreeWidget->topLevelItem(0);
|
auto* item = ui->modTreeWidget->topLevelItem(0);
|
||||||
|
|
||||||
for (int i = 0; item != nullptr; ++i) {
|
for (int i = 1; item != nullptr; ++i) {
|
||||||
if (item->checkState(0) == Qt::CheckState::Unchecked) {
|
if (item->checkState(0) == Qt::CheckState::Unchecked) {
|
||||||
list.append(item->text(0));
|
list.append(item->text(0));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user