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

This commit is contained in:
Lukas Brübach 2025-05-06 08:53:13 +02:00
parent a07c1badd8
commit 6e0acc4e91

View file

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