Don't add duplicate CardInfos to set.

This commit is contained in:
Lukas Brübach 2025-04-19 00:19:59 +02:00
parent adaa31b34d
commit 56bedd03a2

View file

@ -289,8 +289,12 @@ QString CardInfo::getCorrectedName() const
void CardInfo::addToSet(const CardSetPtr &_set, const CardInfoPerSet _info)
{
_set->append(smartThis);
sets[_set->getShortName()].append(_info);
if (!_set->contains(smartThis)) {
_set->append(smartThis);
}
if (!sets[_set->getShortName()].contains(_info)) {
sets[_set->getShortName()].append(_info);
}
refreshCachedSetNames();
}