Fixes issue #2092. Don't include disabled from GUI models in application

default model list.

Signed-off-by: Adam Treat <treat.adam@gmail.com>
This commit is contained in:
Adam Treat 2024-03-08 12:14:48 -05:00 committed by AT
parent 8ee68d1b6f
commit 6c3903a303

View File

@ -492,10 +492,15 @@ const QList<QString> ModelList::userDefaultModelList() const
QList<QString> models;
bool foundUserDefault = false;
for (ModelInfo *info : m_models) {
if (info->installed && info->id() == userDefaultModelName) {
// Only installed models that are meant for GUI are suitable as a default
if (!info->installed || info->disableGUI)
continue;
if (info->id() == userDefaultModelName) {
foundUserDefault = true;
models.prepend(info->name());
} else if (info->installed) {
} else {
models.append(info->name());
}
}