mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-23 10:05:10 -07:00
[DeckEditor] Notify card set changes after zone edits and drop the board scan
- modifyTree emits cardNodesChanged alongside deckHashChanged so the banner-card combo and printing in-deck counts refresh after removing a zone that still holds cards - DecklistNodeTree::findCustomZoneByName is public and moveCustomZone uses it, locating zones under non-standard boards (e.g. tokens) instead of scanning only main/side/maybeboard
This commit is contained in:
parent
48ae7cf0ed
commit
2253e4ff5e
3 changed files with 56 additions and 18 deletions
|
|
@ -124,6 +124,16 @@ public:
|
|||
*/
|
||||
bool hasZoneName(const QString &zoneName) const;
|
||||
|
||||
/**
|
||||
* @brief Finds a custom zone anywhere in the deck by name.
|
||||
*
|
||||
* Walks the children of every top-level zone, so a zone nested under any
|
||||
* board (and not just the standard ones) is found.
|
||||
* @param zoneName The zone name to find.
|
||||
* @return The matching zone node, or nullptr if none exists.
|
||||
*/
|
||||
InnerDecklistNode *findCustomZoneByName(const QString &zoneName) const;
|
||||
|
||||
/**
|
||||
* @brief Applies a function to every card in the deck tree. This can modify the cards.
|
||||
*
|
||||
|
|
@ -137,7 +147,6 @@ private:
|
|||
InnerDecklistNode *getZoneObjFromName(const QString &zoneName) const;
|
||||
InnerDecklistNode *findBoardZone(const QString &boardZoneName) const;
|
||||
InnerDecklistNode *findOrCreateBoardZone(const QString &boardZoneName);
|
||||
InnerDecklistNode *findCustomZoneByName(const QString &zoneName) const;
|
||||
};
|
||||
|
||||
#endif // COCKATRICE_DECKLIST_NODE_TREE_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue