mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-15 03:28:49 -07:00
[PrintingSelector] Sync modified and history state on bulk selection (#6379)
* [PrintingSelector] Emit deckModified when using bulk selection * [PrintingSelector] Hook up history manager. * [PrintingSelector] Remember card amount. * Return early. Took 18 minutes --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
b4e3f2cba9
commit
a799cd097a
4 changed files with 31 additions and 1 deletions
|
|
@ -40,6 +40,11 @@ public:
|
|||
return deckModel;
|
||||
}
|
||||
|
||||
[[nodiscard]] AbstractTabDeckEditor *getDeckEditor() const
|
||||
{
|
||||
return deckEditor;
|
||||
}
|
||||
|
||||
public slots:
|
||||
void retranslateUi();
|
||||
void updateDisplay();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#include "printing_selector_card_selection_widget.h"
|
||||
|
||||
#include "../../../interface/widgets/dialogs/dlg_select_set_for_cards.h"
|
||||
#include "../tabs/abstract_tab_deck_editor.h"
|
||||
|
||||
/**
|
||||
* @brief Constructs a PrintingSelectorCardSelectionWidget for navigating through cards in the deck.
|
||||
|
|
@ -48,6 +49,10 @@ void PrintingSelectorCardSelectionWidget::connectSignals()
|
|||
void PrintingSelectorCardSelectionWidget::selectSetForCards()
|
||||
{
|
||||
auto *setSelectionDialog = new DlgSelectSetForCards(nullptr, parent->getDeckModel());
|
||||
connect(setSelectionDialog, &DlgSelectSetForCards::deckAboutToBeModified, parent->getDeckEditor(),
|
||||
&AbstractTabDeckEditor::onDeckHistorySaveRequested);
|
||||
connect(setSelectionDialog, &DlgSelectSetForCards::deckModified, parent->getDeckEditor(),
|
||||
&AbstractTabDeckEditor::onDeckModified);
|
||||
if (!setSelectionDialog->exec()) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue