Don't erase the settings, but ignore them.

Signed-off-by: Adam Treat <treat.adam@gmail.com>
This commit is contained in:
Adam Treat 2024-03-11 09:33:41 -04:00 committed by AT
parent f36a2874eb
commit a6a3e0048a

View File

@ -1560,13 +1560,10 @@ void ModelList::updateModelsFromSettings()
if (contains(id))
continue;
// If we can't find the corresponding file, then delete it from settings as this reflects a
// stale model. The file could have been deleted manually by the user for instance.
if (!settings.contains(g + "/filename") || !modelExists(settings.value(g + "/filename").toString())) {
settings.remove(g);
settings.sync();
// If we can't find the corresponding file, then ignore it as this reflects a stale model.
// The file could have been deleted manually by the user for instance or temporarily renamed.
if (!settings.contains(g + "/filename") || !modelExists(settings.value(g + "/filename").toString()))
continue;
}
addModel(id);