mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Don't add duplicate CardInfos to set. (#5852)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
0c02d15e0d
commit
1d259a86c1
1 changed files with 6 additions and 2 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue