From 6e0acc4e9154d75ee0249ce5a23df67e6b7e3569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Br=C3=BCbach?= Date: Tue, 6 May 2025 08:53:13 +0200 Subject: [PATCH] Set Banner Card again when restoring index on deckList data changes. --- .../ui/widgets/deck_editor/deck_editor_deck_dock_widget.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cockatrice/src/client/ui/widgets/deck_editor/deck_editor_deck_dock_widget.cpp b/cockatrice/src/client/ui/widgets/deck_editor/deck_editor_deck_dock_widget.cpp index 9adf8e095..dabb25a92 100644 --- a/cockatrice/src/client/ui/widgets/deck_editor/deck_editor_deck_dock_widget.cpp +++ b/cockatrice/src/client/ui/widgets/deck_editor/deck_editor_deck_dock_widget.cpp @@ -294,6 +294,9 @@ void DeckEditorDeckDockWidget::updateBannerCardComboBox() int restoredIndex = bannerCardComboBox->findText(currentText); if (restoredIndex != -1) { bannerCardComboBox->setCurrentIndex(restoredIndex); + if (deckModel->getDeckList()->getBannerCard().second != bannerCardComboBox->itemData(bannerCardComboBox->currentIndex()).toMap()["uuid"].toString()){ + setBannerCard(restoredIndex); + } } else { // Add a placeholder "-" and set it as the current selection int bannerIndex = bannerCardComboBox->findText(deckModel->getDeckList()->getBannerCard().first);