Set Banner Card again when restoring index on deckList data changes. (#5922)

* Set Banner Card again when restoring index on deckList data changes.

* Lint.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
BruebachL 2025-05-07 03:20:38 +02:00 committed by GitHub
parent 4c3cfc8c2d
commit fb6af544e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);