mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-04-10 19:15:13 +00:00
Fixed an issue where flagging a game not to be counted could lead to a crash.
This commit is contained in:
parent
7992e39b0f
commit
1a4c2fc4ae
|
|
@ -304,7 +304,6 @@ void CollectionSystemsManager::refreshCollectionSystems(FileData* file)
|
||||||
realSys.isEnabled = true;
|
realSys.isEnabled = true;
|
||||||
realSys.isPopulated = true;
|
realSys.isPopulated = true;
|
||||||
realSys.decl.isCustom = false;
|
realSys.decl.isCustom = false;
|
||||||
|
|
||||||
updateCollectionSystem(file, realSys);
|
updateCollectionSystem(file, realSys);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -343,7 +342,7 @@ void CollectionSystemsManager::updateCollectionSystem(FileData* file, Collection
|
||||||
else
|
else
|
||||||
mFavoritesSorting = Settings::getInstance()->getBool("FavoritesFirst");
|
mFavoritesSorting = Settings::getInstance()->getBool("FavoritesFirst");
|
||||||
|
|
||||||
const std::unordered_map<std::string, FileData*>&children =
|
const std::unordered_map<std::string, FileData*>& children =
|
||||||
curSys->getRootFolder()->getChildrenByFilename();
|
curSys->getRootFolder()->getChildrenByFilename();
|
||||||
|
|
||||||
bool found = children.find(key) != children.cend();
|
bool found = children.find(key) != children.cend();
|
||||||
|
|
@ -365,8 +364,12 @@ void CollectionSystemsManager::updateCollectionSystem(FileData* file, Collection
|
||||||
}
|
}
|
||||||
else if (curSys->isCollection() && !file->getCountAsGame()) {
|
else if (curSys->isCollection() && !file->getCountAsGame()) {
|
||||||
// If the countasgame flag has been set to false, then remove the game.
|
// If the countasgame flag has been set to false, then remove the game.
|
||||||
ViewController::get()->
|
if (curSys->isGroupedCustomCollection())
|
||||||
getGameListView(curSys).get()->remove(collectionEntry, false);
|
ViewController::get()->getGameListView(curSys->getRootFolder()->getParent()->
|
||||||
|
getSystem()).get()->remove(collectionEntry, false);
|
||||||
|
else
|
||||||
|
ViewController::get()->
|
||||||
|
getGameListView(curSys).get()->remove(collectionEntry, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
|
|
|
||||||
|
|
@ -385,8 +385,9 @@ void GuiMetaDataEd::save()
|
||||||
if (mSavedCallback)
|
if (mSavedCallback)
|
||||||
mSavedCallback();
|
mSavedCallback();
|
||||||
|
|
||||||
// Update respective Collection Entries.
|
// Update all collections where the game is present.
|
||||||
CollectionSystemsManager::get()->refreshCollectionSystems(mScraperParams.game);
|
if (mScraperParams.game->getType() == GAME)
|
||||||
|
CollectionSystemsManager::get()->refreshCollectionSystems(mScraperParams.game);
|
||||||
|
|
||||||
mScraperParams.system->onMetaDataSavePoint();
|
mScraperParams.system->onMetaDataSavePoint();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue