mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-29 09:35:39 +00:00
Made filters applicable per custom collection (if grouped).
This commit is contained in:
parent
127d900212
commit
e51c7ddf8c
|
@ -312,7 +312,7 @@ const std::string FileData::getVideoPath() const
|
|||
const std::vector<FileData*>& FileData::getChildrenListToDisplay()
|
||||
{
|
||||
|
||||
FileFilterIndex* idx = CollectionSystemManager::get()->getSystemToView(mSystem)->getIndex();
|
||||
FileFilterIndex* idx = mSystem->getIndex();
|
||||
if (idx->isFiltered()) {
|
||||
mFilteredChildren.clear();
|
||||
for (auto it = mChildren.cbegin(); it != mChildren.cend(); it++) {
|
||||
|
|
|
@ -102,9 +102,9 @@ void GuiGamelistFilter::addFiltersToMenu()
|
|||
void GuiGamelistFilter::applyFilters()
|
||||
{
|
||||
std::vector<FilterDataDecl> decls = mFilterIndex->getFilterDataDecls();
|
||||
for (std::map<FilterIndexType, std::shared_ptr< OptionListComponent<std::string>
|
||||
>>::const_iterator it = mFilterOptions.cbegin(); it != mFilterOptions.cend(); ++it ) {
|
||||
std::shared_ptr< OptionListComponent<std::string> > optionList = it->second;
|
||||
for (std::map<FilterIndexType, std::shared_ptr<OptionListComponent<std::string>>>::
|
||||
const_iterator it = mFilterOptions.cbegin(); it != mFilterOptions.cend(); ++it ) {
|
||||
std::shared_ptr<OptionListComponent<std::string>> optionList = it->second;
|
||||
std::vector<std::string> filters = optionList->getSelectedObjects();
|
||||
mFilterIndex->setFilter(it->first, &filters);
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ GuiGamelistOptions::GuiGamelistOptions(
|
|||
|
||||
// Read the applicable favorite sorting setting depending on whether the
|
||||
// system is a custom collection or not.
|
||||
if (CollectionSystemManager::get()->getIsCustomCollection(file->getSystem()))
|
||||
if (isCustomCollection)
|
||||
mFavoritesSorting = Settings::getInstance()->getBool("FavFirstCustom");
|
||||
else
|
||||
mFavoritesSorting = Settings::getInstance()->getBool("FavoritesFirst");
|
||||
|
@ -253,8 +253,14 @@ GuiGamelistOptions::~GuiGamelistOptions()
|
|||
|
||||
void GuiGamelistOptions::openGamelistFilter()
|
||||
{
|
||||
GuiGamelistFilter* ggf;
|
||||
mFiltersChanged = true;
|
||||
GuiGamelistFilter* ggf = new GuiGamelistFilter(mWindow, mSystem);
|
||||
|
||||
if (isCustomCollection)
|
||||
ggf = new GuiGamelistFilter(mWindow, getGamelist()->getCursor()->getSystem());
|
||||
else
|
||||
ggf = new GuiGamelistFilter(mWindow, mSystem);
|
||||
|
||||
mWindow->pushGui(ggf);
|
||||
}
|
||||
|
||||
|
|
|
@ -134,9 +134,6 @@ bool ISimpleGameListView::input(InputConfig* config, Input input)
|
|||
onFocusLost();
|
||||
stopListScrolling();
|
||||
SystemData* systemToView = getCursor()->getSystem();
|
||||
if (systemToView->isCollection())
|
||||
systemToView = CollectionSystemManager::get()->getSystemToView(systemToView);
|
||||
|
||||
ViewController::get()->goToSystemView(systemToView);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue