From 8f6563e7a87d5fd6897fb3c0f1d7aef927a76af5 Mon Sep 17 00:00:00 2001 From: RickyRister Date: Wed, 31 Dec 2025 19:11:08 -0800 Subject: [PATCH] [DeckDockWidget] clean up grouping and format sync --- .../deck_editor/deck_editor_deck_dock_widget.cpp | 14 ++++++-------- .../deck_editor/deck_editor_deck_dock_widget.h | 1 - 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/cockatrice/src/interface/widgets/deck_editor/deck_editor_deck_dock_widget.cpp b/cockatrice/src/interface/widgets/deck_editor/deck_editor_deck_dock_widget.cpp index 62195974b..58bcadc38 100644 --- a/cockatrice/src/interface/widgets/deck_editor/deck_editor_deck_dock_widget.cpp +++ b/cockatrice/src/interface/widgets/deck_editor/deck_editor_deck_dock_widget.cpp @@ -477,16 +477,14 @@ void DeckEditorDeckDockWidget::syncDisplayWidgetsToModel() updateBannerCardComboBox(); bannerCardComboBox->blockSignals(false); updateHash(); - sortDeckModelToDeckView(); - deckTagsDisplayWidget->setTags(deckStateManager->getMetadata().tags); -} - -void DeckEditorDeckDockWidget::sortDeckModelToDeckView() -{ - getModel()->sort(deckView->header()->sortIndicatorSection(), deckView->header()->sortIndicatorOrder()); - getModel()->setActiveFormat(deckStateManager->getMetadata().gameFormat); + formatComboBox->blockSignals(true); formatComboBox->setCurrentIndex(formatComboBox->findData(deckStateManager->getMetadata().gameFormat)); + formatComboBox->blockSignals(false); + + deckTagsDisplayWidget->blockSignals(true); + deckTagsDisplayWidget->setTags(deckStateManager->getMetadata().tags); + deckTagsDisplayWidget->blockSignals(false); } /** diff --git a/cockatrice/src/interface/widgets/deck_editor/deck_editor_deck_dock_widget.h b/cockatrice/src/interface/widgets/deck_editor/deck_editor_deck_dock_widget.h index 1a82b00d1..f99eb6d61 100644 --- a/cockatrice/src/interface/widgets/deck_editor/deck_editor_deck_dock_widget.h +++ b/cockatrice/src/interface/widgets/deck_editor/deck_editor_deck_dock_widget.h @@ -51,7 +51,6 @@ public slots: void selectNextCard(); void updateBannerCardComboBox(); void syncDisplayWidgetsToModel(); - void sortDeckModelToDeckView(); void actAddCard(const ExactCard &card, const QString &zoneName); void actIncrementSelection(); void actDecrementCard(const ExactCard &card, QString zoneName);