Fixed an issue where deleting a game would not properly reload the gamelist.

This commit is contained in:
Leon Styhre 2021-01-31 19:28:30 +01:00
parent 2d6103efa6
commit 814b0cfd18

View file

@ -378,10 +378,11 @@ void GuiGamelistOptions::openMetaDataEd()
LOG(LogInfo) << "Deleting the game file \"" << file->getFullPath() <<
"\", all its media files and its gamelist.xml entry.";
CollectionSystemsManager::get()->deleteCollectionFiles(file);
ViewController::get()->getGameListView(
file->getSystem()).get()->removeMedia(file);
ViewController::get()->getGameListView(
file->getSystem()).get()->remove(file, true);
ViewController::get()->getGameListView(file->getSystem()).get()->removeMedia(file);
ViewController::get()->getGameListView(file->getSystem()).get()->remove(file, true);
mSystem->getRootFolder()->sort(*mListSort->getSelected(), mFavoritesSorting);
ViewController::get()->reloadGameListView(mSystem);
mWindow->invalidateCachedBackground();
};