mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-05 01:23:24 -08:00
Fix deck export and mana group ordering (#7729)
This commit is contained in:
parent
2056043104
commit
ca2301bc96
8 changed files with 113 additions and 10 deletions
|
|
@ -340,7 +340,17 @@ bool DeckList::saveToStream_Plain(QTextStream &stream, bool prefixSideboardCards
|
|||
}
|
||||
};
|
||||
|
||||
forEachCard(writeToStream);
|
||||
// Export the main deck first without changing the saved tree's zone order.
|
||||
forEachCard([&](const auto node, const auto card) {
|
||||
if (node->getName() == DECK_ZONE_MAIN) {
|
||||
writeToStream(node, card);
|
||||
}
|
||||
});
|
||||
forEachCard([&](const auto node, const auto card) {
|
||||
if (node->getName() != DECK_ZONE_MAIN) {
|
||||
writeToStream(node, card);
|
||||
}
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue