mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 08:14:47 -07:00
Set modification state correctly. (#5678)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
e541b9d572
commit
56bd11794e
2 changed files with 6 additions and 6 deletions
|
|
@ -76,8 +76,8 @@ void AbstractTabDeckEditor::updateCard(CardInfoPtr _card)
|
|||
|
||||
void AbstractTabDeckEditor::onDeckChanged()
|
||||
{
|
||||
setModified(true);
|
||||
deckMenu->setSaveStatus(!getDeckList()->isEmpty());
|
||||
setModified(isBlankNewDeck());
|
||||
deckMenu->setSaveStatus(!isBlankNewDeck());
|
||||
}
|
||||
|
||||
void AbstractTabDeckEditor::addCardHelper(const CardInfoPtr info, QString zoneName)
|
||||
|
|
|
|||
|
|
@ -200,20 +200,19 @@ void DeckEditorDeckDockWidget::updateCard(const QModelIndex /*¤t*/, const
|
|||
void DeckEditorDeckDockWidget::updateName(const QString &name)
|
||||
{
|
||||
deckModel->getDeckList()->setName(name);
|
||||
deckEditor->setModified(true);
|
||||
deckEditor->deckMenu->setSaveStatus(true);
|
||||
emit deckChanged();
|
||||
}
|
||||
|
||||
void DeckEditorDeckDockWidget::updateComments()
|
||||
{
|
||||
deckModel->getDeckList()->setComments(commentsEdit->toPlainText());
|
||||
deckEditor->setModified(true);
|
||||
deckEditor->deckMenu->setSaveStatus(true);
|
||||
emit deckChanged();
|
||||
}
|
||||
|
||||
void DeckEditorDeckDockWidget::updateHash()
|
||||
{
|
||||
hashLabel->setText(deckModel->getDeckList()->getDeckHash());
|
||||
emit deckChanged();
|
||||
}
|
||||
|
||||
void DeckEditorDeckDockWidget::updateBannerCardComboBox()
|
||||
|
|
@ -287,6 +286,7 @@ void DeckEditorDeckDockWidget::setBannerCard(int /* changedIndex */)
|
|||
QVariantMap itemData = bannerCardComboBox->itemData(bannerCardComboBox->currentIndex()).toMap();
|
||||
deckModel->getDeckList()->setBannerCard(
|
||||
QPair<QString, QString>(itemData["name"].toString(), itemData["uuid"].toString()));
|
||||
emit deckChanged();
|
||||
}
|
||||
|
||||
void DeckEditorDeckDockWidget::setDeck(DeckLoader *_deck)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue