mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-24 23:36:01 -05:00
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:
parent
4c3cfc8c2d
commit
fb6af544e2
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user