mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-17 22:55:38 +00:00
Fixed two issues with grouped custom collections.
A crash was caused by the grouped custom collection flag not being set to false when changing from grouped to ungrouped via the settings menu, and the favorite game counter was not updated for custom collections as the actual system was sorted instead of the parent system.
This commit is contained in:
parent
07efcd19d0
commit
9bfee8edff
|
@ -414,8 +414,17 @@ void CollectionSystemManager::updateCollectionSystem(FileData* file, CollectionS
|
|||
// collection, then skip the sorting.
|
||||
else if (sysData.decl.isCustom &&
|
||||
children.find(file->getFullPath()) != children.cend()) {
|
||||
rootFolder->sort(rootFolder->getSortTypeFromString(rootFolder->getSortTypeString()),
|
||||
mFavoritesSorting);
|
||||
// For custom collections, update either the actual system or its parent depending
|
||||
// on whether the collection is grouped or not.
|
||||
if (rootFolder->getSystem()->isGroupedCustomCollection()) {
|
||||
rootFolder->getParent()->sort(rootFolder->getParent()->
|
||||
getSortTypeFromString(rootFolder->getParent()->
|
||||
getSortTypeString()), mFavoritesSorting);
|
||||
}
|
||||
else {
|
||||
rootFolder->sort(rootFolder->getSortTypeFromString(rootFolder->getSortTypeString()),
|
||||
mFavoritesSorting);
|
||||
}
|
||||
}
|
||||
else if (!sysData.decl.isCustom) {
|
||||
rootFolder->sort(rootFolder->getSortTypeFromString(rootFolder->getSortTypeString()),
|
||||
|
@ -1051,6 +1060,7 @@ void CollectionSystemManager::addEnabledCollectionsToDisplayedSystems(
|
|||
if (!gameList->getCursor()->isPlaceHolder()) {
|
||||
gameList->setCursor(gameList->getFirstEntry());
|
||||
}
|
||||
it->second.system->setIsGroupedCustomCollection(false);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in a new issue