Fix deck export and mana group ordering (#7729)

This commit is contained in:
Bryce! 2026-11-04 09:43:38 -05:00 • committed by GitHub
parent 2056043104
commit ca2301bc96
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 113 additions and 10 deletions

View file

@ -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;
}