mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 22:42:14 -07:00
Set Banner Card again when restoring index on deckList data changes.
This commit is contained in:
parent
a07c1badd8
commit
6e0acc4e91
1 changed files with 3 additions and 0 deletions
|
|
@ -294,6 +294,9 @@ void DeckEditorDeckDockWidget::updateBannerCardComboBox()
|
||||||
int restoredIndex = bannerCardComboBox->findText(currentText);
|
int restoredIndex = bannerCardComboBox->findText(currentText);
|
||||||
if (restoredIndex != -1) {
|
if (restoredIndex != -1) {
|
||||||
bannerCardComboBox->setCurrentIndex(restoredIndex);
|
bannerCardComboBox->setCurrentIndex(restoredIndex);
|
||||||
|
if (deckModel->getDeckList()->getBannerCard().second != bannerCardComboBox->itemData(bannerCardComboBox->currentIndex()).toMap()["uuid"].toString()){
|
||||||
|
setBannerCard(restoredIndex);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// Add a placeholder "-" and set it as the current selection
|
// Add a placeholder "-" and set it as the current selection
|
||||||
int bannerIndex = bannerCardComboBox->findText(deckModel->getDeckList()->getBannerCard().first);
|
int bannerIndex = bannerCardComboBox->findText(deckModel->getDeckList()->getBannerCard().first);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue