Fixed additional issue with folder updates and gamelist sorting.

This commit is contained in:
Leon Styhre 2020-09-27 11:19:55 +02:00
parent cc6b4eb47d
commit 90f5d7fad4

View file

@ -359,22 +359,19 @@ void GuiMetaDataEd::save()
// Enter game in index.
mScraperParams.system->getIndex()->addToIndex(mScraperParams.game);
// If it's a folder that has been updated, we need to manually sort the gamelist
// as CollectionSystemManager ignores folders.
if (mScraperParams.game->getType() == FOLDER)
mScraperParams.system->sortSystem(false);
if (mSavedCallback)
mSavedCallback();
// Update respective Collection Entries.
CollectionSystemManager::get()->refreshCollectionSystems(mScraperParams.game);
// If it's a folder that has been updated, we need to manually sort and reload the
// gamelist as CollectionSystemManager ignores folders.
if (mScraperParams.game->getType() == FOLDER) {
FileData* systemRoot = mScraperParams.system->getRootFolder();
systemRoot->sort(systemRoot->getSortTypeFromString(systemRoot->getSortTypeString()),
Settings::getInstance()->getBool("FavoritesFirst"));
ViewController::get()->reloadGameListView(mScraperParams.system);
}
mScraperParams.system->onMetaDataSavePoint();
// Make sure that the cached background is updated to reflect any possible visible
// changes to the gamelist (e.g. the game name).
mWindow->invalidateCachedBackground();