From 13b3a6f65c1456482c9de68e6f77870aa3f0fcda Mon Sep 17 00:00:00 2001 From: RickyRister Date: Sun, 30 Nov 2025 02:21:52 -0800 Subject: [PATCH] remove deckHashChanged --- .../widgets/deck_editor/deck_editor_deck_dock_widget.cpp | 1 - libcockatrice_deck_list/libcockatrice/deck_list/deck_list.cpp | 2 +- .../libcockatrice/models/deck_list/deck_list_model.cpp | 2 ++ 3 files changed, 3 insertions(+), 2 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 4db7b8774..9b49d7284 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 @@ -424,7 +424,6 @@ void DeckEditorDeckDockWidget::setDeck(DeckLoader *_deck) deckLoader->setParent(this); deckModel->setDeckList(deckLoader->getDeckList()); connect(deckLoader, &DeckLoader::deckLoaded, deckModel, &DeckListModel::rebuildTree); - connect(deckLoader->getDeckList(), &DeckList::deckHashChanged, deckModel, &DeckListModel::deckHashChanged); emit requestDeckHistoryClear(); historyManagerWidget->setDeckListModel(deckModel); diff --git a/libcockatrice_deck_list/libcockatrice/deck_list/deck_list.cpp b/libcockatrice_deck_list/libcockatrice/deck_list/deck_list.cpp index 32321457b..1b66a1d42 100644 --- a/libcockatrice_deck_list/libcockatrice/deck_list/deck_list.cpp +++ b/libcockatrice_deck_list/libcockatrice/deck_list/deck_list.cpp @@ -714,7 +714,7 @@ QString DeckList::getDeckHash() const } /** - * Invalidates the cached deckHash and emits the deckHashChanged signal. + * Invalidates the cached deckHash. */ void DeckList::refreshDeckHash() { diff --git a/libcockatrice_models/libcockatrice/models/deck_list/deck_list_model.cpp b/libcockatrice_models/libcockatrice/models/deck_list/deck_list_model.cpp index e3e2de58d..964d04aba 100644 --- a/libcockatrice_models/libcockatrice/models/deck_list/deck_list_model.cpp +++ b/libcockatrice_models/libcockatrice/models/deck_list/deck_list_model.cpp @@ -284,6 +284,7 @@ bool DeckListModel::setData(const QModelIndex &index, const QVariant &value, con emitRecursiveUpdates(index); deckList->refreshDeckHash(); + emit deckHashChanged(); emit dataChanged(index, index); return true; @@ -422,6 +423,7 @@ QModelIndex DeckListModel::addCard(const ExactCard &card, const QString &zoneNam cardNode->setCardCollectorNumber(printingInfo.getProperty("num")); cardNode->setCardProviderId(printingInfo.getProperty("uuid")); deckList->refreshDeckHash(); + emit deckHashChanged(); } sort(lastKnownColumn, lastKnownOrder); emitRecursiveUpdates(parentIndex);