Don't add duplicate CardInfos to set. (#5852)

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
BruebachL 2025-04-19 01:27:50 +02:00 committed by GitHub
parent 0c02d15e0d
commit 1d259a86c1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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();
}