From fb6af544e210b1ddd48ca4ec13a22dc3a792075d Mon Sep 17 00:00:00 2001 From: BruebachL <44814898+BruebachL@users.noreply.github.com> Date: Wed, 7 May 2025 03:20:38 +0200 Subject: [PATCH] Set Banner Card again when restoring index on deckList data changes. (#5922) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Set Banner Card again when restoring index on deckList data changes. * Lint. --------- Co-authored-by: Lukas BrĂ¼bach --- .../ui/widgets/deck_editor/deck_editor_deck_dock_widget.cpp | 4 ++++ 1 file changed, 4 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..2fde0b305 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,10 @@ 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);