Fix deck export and mana group ordering

This commit is contained in:
Bryce! 2026-11-01 18:45:16 -05:00 • committed by Lukas Brübach
parent e08402ac94
commit 8585723656
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;
}