Fixed an incorrect menu entry when editing custom collections.

This commit is contained in:
Leon Styhre 2020-10-26 18:35:52 +01:00
parent 01cf401d8f
commit 8ec7301f4b
2 changed files with 15 additions and 12 deletions

View file

@ -621,6 +621,7 @@ Whether to place all folders on top of the gamelists. If done so, the folders wi
Whether to sort your favorite games above your other games in the gamelists.
**Add star markings to favorite games**
With this setting enabled, there is a star symbol added at the beginning of the game name in the gamelist views. It's strongly recommended to keep this setting enabled if the option to sort favorite games above non-favorites has been enabled. If not, favorite games would be sorted on top of the gamelist with no visual indication that they are favorites, which would be very confusing.
**Gamelist filters**

View file

@ -144,20 +144,22 @@ GuiGamelistOptions::GuiGamelistOptions(
}
}
std::map<std::string, CollectionSystemData, stringComparator> customCollections =
CollectionSystemManager::get()->getCustomCollectionSystems();
std::string customSystem;
if (Settings::getInstance()->getBool("UseCustomCollectionsSystem"))
customSystem = file->getSystem()->getName();
else
customSystem = system->getName();
if (UIModeController::getInstance()->isUIModeFull() &&
((customCollections.find(system->getName()) != customCollections.cend() &&
CollectionSystemManager::get()->getEditingCollection() != system->getName()) ||
CollectionSystemManager::get()->getCustomCollectionsBundle()->getName() ==
system->getName())) {
row.elements.clear();
row.addElement(std::make_shared<TextComponent>(
mWindow, "ADD/REMOVE GAMES TO THIS GAME COLLECTION", Font::get(FONT_SIZE_MEDIUM),
0x777777FF), true);
row.makeAcceptInputHandler(std::bind(&GuiGamelistOptions::startEditMode, this));
mMenu.addRow(row);
(isCustomCollection || isCustomCollectionGroup)) {
if (CollectionSystemManager::get()->getEditingCollection() != customSystem) {
row.elements.clear();
row.addElement(std::make_shared<TextComponent>(
mWindow, "ADD/REMOVE GAMES TO THIS GAME COLLECTION",
Font::get(FONT_SIZE_MEDIUM), 0x777777FF), true);
row.makeAcceptInputHandler(std::bind(&GuiGamelistOptions::startEditMode, this));
mMenu.addRow(row);
}
}
if (UIModeController::getInstance()->isUIModeFull() &&