mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 23:55:38 +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);
|
||||
rootFolder->addChild(newGame);
|
||||
fileIndex->addToIndex(newGame);
|
||||
ViewController::get()->
|
||||
getGameListView(curSys)->onFileChanged(newGame, false);
|
||||
ViewController::get()->getGameListView(curSys)->onFileChanged(newGame, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -699,7 +698,8 @@ bool CollectionSystemsManager::toggleGameInCollection(FileData* file)
|
|||
saveCustomCollection(sysData);
|
||||
}
|
||||
else {
|
||||
file->getSourceFileData()->getSystem()->getIndex()->removeFromIndex(file);
|
||||
file->getSourceFileData()->getSystem()->getIndex()->removeFromIndex(
|
||||
file->getSourceFileData());
|
||||
MetaDataList* md = &file->getSourceFileData()->metadata;
|
||||
std::string value = md->get("favorite");
|
||||
if (value == "false") {
|
||||
|
@ -710,13 +710,13 @@ bool CollectionSystemsManager::toggleGameInCollection(FileData* file)
|
|||
md->set("favorite", "false");
|
||||
}
|
||||
|
||||
file->getSourceFileData()->getSystem()->getIndex()->addToIndex(file);
|
||||
file->getSourceFileData()->getSystem()->getIndex()->addToIndex(
|
||||
file->getSourceFileData());
|
||||
file->getSourceFileData()->getSystem()->onMetaDataSavePoint();
|
||||
refreshCollectionSystems(file->getSourceFileData());
|
||||
if (mAutoCollectionSystemsData["favorites"].isEnabled)
|
||||
ViewController::get()->
|
||||
reloadGameListView(mAutoCollectionSystemsData["favorites"].system);
|
||||
|
||||
}
|
||||
if (adding)
|
||||
s = new GuiInfoPopup(mWindow, "ADDED '" +
|
||||
|
|
|
@ -69,9 +69,6 @@ FileData::FileData(
|
|||
|
||||
FileData::~FileData()
|
||||
{
|
||||
if (mType == GAME)
|
||||
mSystem->getIndex()->removeFromIndex(this);
|
||||
|
||||
while (mChildren.size() > 0)
|
||||
delete (mChildren.front());
|
||||
|
||||
|
|
Loading…
Reference in a new issue