Permalink
Browse files

Merge pull request #7358 from Techjar/qt-memcard-manager-deletion-fix

Qt/GCMemcardManager: Fix deletion of multiple files
  • Loading branch information...
delroth committed Aug 27, 2018
2 parents 966e47b + fd7d51e commit e096ca20e976b74d0b2a307d2d1eb863c6c144ce
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 e096ca2

Please sign in to comment.