mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-29 17:32:17 -07:00
Small bug fixes
Took 20 minutes Took 10 seconds
This commit is contained in:
parent
ec80acb7ab
commit
48780ccc24
2 changed files with 16 additions and 0 deletions
|
|
@ -241,6 +241,18 @@ void CardDatabase::addFormat(const FormatRulesPtr &format)
|
|||
|
||||
void CardDatabase::swapInDatabaseData(CardDatabaseData data)
|
||||
{
|
||||
for (const auto &card : cards) {
|
||||
for (auto *rel : card->getRelatedCards()) {
|
||||
rel->deleteLater();
|
||||
}
|
||||
for (auto *rel : card->getReverseRelatedCards()) {
|
||||
rel->deleteLater();
|
||||
}
|
||||
for (auto *rel : card->getReverseRelatedCards2Me()) {
|
||||
rel->deleteLater();
|
||||
}
|
||||
}
|
||||
|
||||
cards = std::move(data.cards);
|
||||
simpleNameCards = std::move(data.simpleNameCards);
|
||||
sets = std::move(data.sets);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue