mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 00:24:47 -07:00
[DeckEditor] Deck List History Manager. (#6340)
* [DeckEditor] Deck List History Manager. Took 23 minutes Took 17 minutes * Add icons. Took 2 minutes Took 3 seconds * Small fixes. Took 12 minutes * Style lint. Took 48 seconds * tr() things. Took 5 minutes * Add tooltips for buttons. Took 3 minutes * Add explanation label to history. Took 3 minutes * Refactor to .cpp, delegate undo/redo to manager, don't return memento Took 8 minutes * Clear history when setting deck. Took 6 minutes * Move to value based stacks. Took 52 seconds * Default constructor. Took 31 seconds Took 3 minutes Took 4 minutes Took 2 minutes * Have it listen to deck editor additions. Took 18 minutes * Don't connect buttons *and* actions. Took 2 minutes --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
c46f6d1178
commit
846f16ddaa
21 changed files with 612 additions and 41 deletions
|
|
@ -131,6 +131,8 @@ void AbstractTabDeckEditor::addCardHelper(const ExactCard &card, QString zoneNam
|
|||
if (card.getInfo().getIsToken())
|
||||
zoneName = DECK_ZONE_TOKENS;
|
||||
|
||||
emit cardAboutToBeAdded(card, zoneName);
|
||||
|
||||
QModelIndex newCardIndex = deckDockWidget->deckModel->addCard(card, zoneName);
|
||||
deckDockWidget->deckView->clearSelection();
|
||||
deckDockWidget->deckView->setCurrentIndex(newCardIndex);
|
||||
|
|
|
|||
|
|
@ -180,6 +180,7 @@ public slots:
|
|||
virtual void dockTopLevelChanged(bool topLevel) = 0;
|
||||
|
||||
signals:
|
||||
void cardAboutToBeAdded(const ExactCard &addedCard, const QString &zoneName);
|
||||
/** @brief Emitted when a deck should be opened in a new editor tab. */
|
||||
void openDeckEditor(DeckLoader *deckLoader);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue