mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-12 21:44:18 -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)
|
void CardInfo::addToSet(const CardSetPtr &_set, const CardInfoPerSet _info)
|
||||||
{
|
{
|
||||||
_set->append(smartThis);
|
if (!_set->contains(smartThis)) {
|
||||||
sets[_set->getShortName()].append(_info);
|
_set->append(smartThis);
|
||||||
|
}
|
||||||
|
if (!sets[_set->getShortName()].contains(_info)) {
|
||||||
|
sets[_set->getShortName()].append(_info);
|
||||||
|
}
|
||||||
|
|
||||||
refreshCachedSetNames();
|
refreshCachedSetNames();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue