Figure out if the user changed anything when editing

And mark the divelist changed.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-05-19 14:13:04 -07:00
parent 9ffa37ab6f
commit 920a2069b0

View file

@ -272,6 +272,14 @@ void MainTab::on_editAccept_clicked(bool edit)
ui->diveNotesMessage->animatedHide();
ui->editAccept->hide();
ui->editReset->hide();
/* now figure out if things have changed */
if (notesBackup.buddy != ui->buddy->text() ||
notesBackup.suit != ui->suit->text() ||
notesBackup.notes != ui->notes->toPlainText() ||
notesBackup.divemaster != ui->divemaster->text() ||
notesBackup.location != ui->location->text() ||
notesBackup.rating != ui->rating->currentStars())
mark_divelist_changed(TRUE);
}
}