mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-01-04 00:57:12 -08:00
[DeckEditor] Properly check if deck is blank. (#6188)
* [DeckEditor] Properly check if deck is blank. Took 20 minutes * Rename. Took 17 minutes --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
@@ -186,7 +186,7 @@ void AbstractTabDeckEditor::setModified(bool _modified)
|
||||
bool AbstractTabDeckEditor::isBlankNewDeck() const
|
||||
{
|
||||
DeckLoader *deck = getDeckList();
|
||||
return !modified && deck->hasNotBeenLoaded();
|
||||
return !modified && deck->isBlankDeck() && deck->hasNotBeenLoaded();
|
||||
}
|
||||
|
||||
void AbstractTabDeckEditor::actNewDeck()
|
||||
|
||||
@@ -243,6 +243,11 @@ public:
|
||||
}
|
||||
///@}
|
||||
|
||||
bool isBlankDeck() const
|
||||
{
|
||||
return name.isEmpty() && comments.isEmpty() && getCardList().isEmpty();
|
||||
}
|
||||
|
||||
/// @name Sideboard plans
|
||||
///@{
|
||||
QList<MoveCard_ToZone> getCurrentSideboardPlan();
|
||||
|
||||
Reference in New Issue
Block a user