Further improvement to adding or removing collections.

This commit is contained in:
Leon Styhre 2021-01-02 15:14:13 +01:00
parent 5565170d93
commit 830c53e3cc
2 changed files with 5 additions and 1 deletions

View file

@ -257,7 +257,6 @@ GuiCollectionSystemsOptions::GuiCollectionSystemsOptions(
collectionsConfigEntry);
setNeedsSaving();
setNeedsGoToStart();
setNeedsGoToSystem(SystemData::sSystemVector.front());
}
CollectionSystemsManager::get()->deleteCustomCollection(name);
return true;

View file

@ -84,12 +84,17 @@ void GuiSettings::save()
ViewController::get()->goToSystem(mGoToSystem, false);
if (mNeedsGoToGroupedCollections) {
bool groupedSystemExists = false;
for (SystemData* system : SystemData::sSystemVector) {
if (system->getThemeFolder() == "custom-collections") {
ViewController::get()->goToSystem(system, false);
groupedSystemExists = true;
continue;
}
}
if (!groupedSystemExists)
// No grouped custom collection system exists, so go to the first system instead.
ViewController::get()->goToSystem(SystemData::sSystemVector.front(), false);
}
if (mNeedsCollectionsUpdate) {