Fixed an issue where folders in mixed gamelists were not always sorted correctly.

This commit is contained in:
Leon Styhre 2022-12-05 21:08:20 +01:00
parent da93533aed
commit 8013e04d2c

View file

@ -538,7 +538,7 @@ void FileData::sort(ComparisonFunction& comparator,
getSortTypeFromString("filename, ascending").comparisonFunction);
}
if (foldersOnTop && mOnlyFolders)
if (foldersOnTop)
std::stable_sort(mChildrenFolders.begin(), mChildrenFolders.end(), comparator);
std::stable_sort(mChildrenOthers.begin(), mChildrenOthers.end(), comparator);
@ -685,7 +685,7 @@ void FileData::sortFavoritesOnTop(ComparisonFunction& comparator,
}
// Sort favorite games and the other games separately.
if (foldersOnTop && mOnlyFolders) {
if (foldersOnTop) {
std::stable_sort(mChildrenFavoritesFolders.begin(), mChildrenFavoritesFolders.end(),
comparator);
std::stable_sort(mChildrenFolders.begin(), mChildrenFolders.end(), comparator);