Fix issue #2087 where cloned models were lost and listed in download dialog erroneously.

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

View File

@ -393,7 +393,8 @@ bool DownloadableModels::filterAcceptsRow(int sourceRow,
bool isDownloadable = !sourceModel()->data(index, ModelList::DescriptionRole).toString().isEmpty();
bool isInstalled = !sourceModel()->data(index, ModelList::InstalledRole).toString().isEmpty();
bool isIncomplete = !sourceModel()->data(index, ModelList::IncompleteRole).toString().isEmpty();
return withinLimit && (isDownloadable || isInstalled || isIncomplete);
bool isClone = sourceModel()->data(index, ModelList::IsCloneRole).toBool();
return withinLimit && !isClone && (isDownloadable || isInstalled || isIncomplete);
}
int DownloadableModels::count() const