mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07: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
1 changed files with 4 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue