Permalink
Browse files

Qt/GCMemcardManager: Fix deletion of multiple files

  • Loading branch information...
Techjar committed Aug 24, 2018
1 parent e92443e commit fd7d51eed61fc8b9bc67e00327c015d5e21d0834
Showing with 6 additions and 1 deletion.
  1. +6 −1 Source/Core/DolphinQt/GCMemcardManager.cpp
@@ -382,10 +382,15 @@ void GCMemcardManager::DeleteFiles()
return;
}
std::vector<int> file_indices;
for (int i = 0; i < count; i++)
{
auto sel = selection[i * m_slot_table[m_active_slot]->columnCount()];
int file_index = memcard->GetFileIndex(m_slot_table[m_active_slot]->row(sel));
file_indices.push_back(memcard->GetFileIndex(m_slot_table[m_active_slot]->row(sel)));
}
for (int file_index : file_indices)
{
if (memcard->RemoveFile(file_index) != SUCCESS)
QMessageBox::warning(this, tr("Remove failed"), tr("Failed to remove file"));
}

0 comments on commit fd7d51e

Please sign in to comment.