mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-12-01 18:45:39 +00:00
Fixed an issue where the gamelist filter index would be incorrectly updated.
This commit is contained in:
parent
d22e0fb5b5
commit
a300632ab8
|
@ -403,8 +403,7 @@ void CollectionSystemsManager::updateCollectionSystem(FileData* file, Collection
|
||||||
CollectionFileData* newGame = new CollectionFileData(file, curSys);
|
CollectionFileData* newGame = new CollectionFileData(file, curSys);
|
||||||
rootFolder->addChild(newGame);
|
rootFolder->addChild(newGame);
|
||||||
fileIndex->addToIndex(newGame);
|
fileIndex->addToIndex(newGame);
|
||||||
ViewController::get()->
|
ViewController::get()->getGameListView(curSys)->onFileChanged(newGame, false);
|
||||||
getGameListView(curSys)->onFileChanged(newGame, false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -699,7 +698,8 @@ bool CollectionSystemsManager::toggleGameInCollection(FileData* file)
|
||||||
saveCustomCollection(sysData);
|
saveCustomCollection(sysData);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
file->getSourceFileData()->getSystem()->getIndex()->removeFromIndex(file);
|
file->getSourceFileData()->getSystem()->getIndex()->removeFromIndex(
|
||||||
|
file->getSourceFileData());
|
||||||
MetaDataList* md = &file->getSourceFileData()->metadata;
|
MetaDataList* md = &file->getSourceFileData()->metadata;
|
||||||
std::string value = md->get("favorite");
|
std::string value = md->get("favorite");
|
||||||
if (value == "false") {
|
if (value == "false") {
|
||||||
|
@ -710,13 +710,13 @@ bool CollectionSystemsManager::toggleGameInCollection(FileData* file)
|
||||||
md->set("favorite", "false");
|
md->set("favorite", "false");
|
||||||
}
|
}
|
||||||
|
|
||||||
file->getSourceFileData()->getSystem()->getIndex()->addToIndex(file);
|
file->getSourceFileData()->getSystem()->getIndex()->addToIndex(
|
||||||
|
file->getSourceFileData());
|
||||||
file->getSourceFileData()->getSystem()->onMetaDataSavePoint();
|
file->getSourceFileData()->getSystem()->onMetaDataSavePoint();
|
||||||
refreshCollectionSystems(file->getSourceFileData());
|
refreshCollectionSystems(file->getSourceFileData());
|
||||||
if (mAutoCollectionSystemsData["favorites"].isEnabled)
|
if (mAutoCollectionSystemsData["favorites"].isEnabled)
|
||||||
ViewController::get()->
|
ViewController::get()->
|
||||||
reloadGameListView(mAutoCollectionSystemsData["favorites"].system);
|
reloadGameListView(mAutoCollectionSystemsData["favorites"].system);
|
||||||
|
|
||||||
}
|
}
|
||||||
if (adding)
|
if (adding)
|
||||||
s = new GuiInfoPopup(mWindow, "ADDED '" +
|
s = new GuiInfoPopup(mWindow, "ADDED '" +
|
||||||
|
|
|
@ -69,9 +69,6 @@ FileData::FileData(
|
||||||
|
|
||||||
FileData::~FileData()
|
FileData::~FileData()
|
||||||
{
|
{
|
||||||
if (mType == GAME)
|
|
||||||
mSystem->getIndex()->removeFromIndex(this);
|
|
||||||
|
|
||||||
while (mChildren.size() > 0)
|
while (mChildren.size() > 0)
|
||||||
delete (mChildren.front());
|
delete (mChildren.front());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue