From 920a2069b07586b0855617c4099ea405cabb594e Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 19 May 2013 14:13:04 -0700 Subject: [PATCH] Figure out if the user changed anything when editing And mark the divelist changed. Signed-off-by: Dirk Hohndel --- qt-ui/maintab.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 0ded30da3..8267c1139 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -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); } }