Cockatrice/libcockatrice_deck_list/libcockatrice/deck_list
BruebachL 0d09e633e3
[Client] Expose custom zone management in the deck editor (#7205)
* [Client] Expose custom zone management in the deck editor

Wires the state layer into every editor surface that shows deck zones.

- Deck dock: context menu on zones gains New/Rename/Delete/Change
  board actions, with per-zone submenus for adding cards.
- Card database dock and visual database display gain an add-to-zone
  submenu listing custom zones per board plus a create-zone entry.
- All prompt call sites pass validateNewZoneName so duplicates and
  reserved names are rejected inline before Ok unlocks.
- Rename reuses the same dialog in name-only mode, keeping one
  validation contract for every zone-name entry point.
- Change board marks the current board instead of offering a no-op,
  and the state layer refuses moves onto boards holding a same-named
  zone from imported decks.

* [DeckEditor] Address custom-zone menu and export review feedback

* [DeckLoader] Keep the sideboard marker and block ordering when exporting nested zones

- saveToStream_DeckZone threads the owning board zone name down to the card
  writer, so cards in a custom zone under the sideboard keep their SB:
  prefix instead of being re-imported into the maindeck
- nested sub-zones are collected during the loop and written after the
  parent zone's own header and cards, so they no longer read as part of the
  zone printed before them

* [DeckEditor] Fix move-to-zone menu use-after-free and per-zone enabled state

- resolve the card name/provider/collector number before createNewCustomZone
  rebuilds the model tree, then re-find the refreshed index via findCard and
  move it (mirrors the decrementCard re-find pattern)
- the enabled test now compares the card's own zone (nearest custom-zone
  ancestor, else its board), matching moveCardToZone's lookup, so moving a
  card out of a custom zone back to the board root is offered and the card's
  own zone is disabled

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-09-05 22:00:21 +02:00
..
tree [Client] Expose custom zone management in the deck editor (#7205) 2026-09-05 22:00:21 +02:00
deck_list.cpp [DeckList] Add maybeboard zone constant and skip it in exports (#7174) 2026-08-24 18:04:22 +02:00
deck_list.h [Game] Playmats (#7101) 2026-08-21 10:40:49 +02:00
deck_list_history_manager.cpp style: Add braces to all control flow statements (#6887) 2026-05-16 19:19:53 +02:00
deck_list_history_manager.h [Fix-Warnings] Mark const getters as [[nodiscard]] (#6365) 2025-11-28 21:38:54 +01:00
deck_list_memento.h [Fix-Warnings] Mark const getters as [[nodiscard]] (#6365) 2025-11-28 21:38:54 +01:00
deck_list_node_tree.cpp add a limit to the size of deckfiles cockatrice can load (#7163) 2026-08-29 15:21:04 +02:00
deck_list_node_tree.h [Client] Add zone management to the deck state manager (#7204) 2026-09-05 22:00:21 +02:00
playmat_resolver.cpp [Game] Playmats (#7101) 2026-08-21 10:40:49 +02:00
playmat_resolver.h [Game] Playmats (#7101) 2026-08-21 10:40:49 +02:00
sideboard_plan.cpp style: Add braces to all control flow statements (#6887) 2026-05-16 19:19:53 +02:00
sideboard_plan.h Standardize Doxygen documentation (#6885) 2026-05-21 22:58:07 +02:00