Only mark dive list as changed if 'Accepted' was clicked.

The old code marked the dive list as changed on any
of the changes in the model, this was incorrect since
the user could just cancel the edition, wich means
that the divelist shouldn't be marked as changed at all.

when the user clicks on'accept', and the item is indeed
changed on the dive list, then we mark_divelist_changed
to TRUE

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
Tomaz Canabrava 2013-09-25 14:30:03 -03:00
parent 2c14f3aa3b
commit 94c8f64316
2 changed files with 2 additions and 12 deletions

View file

@ -431,6 +431,8 @@ void MainTab::acceptChanges()
mainWindow()->globe()->reload();
mainWindow()->globe()->centerOn(current_dive);
}
if (cylindersModel->changed || weightModel->changed)
mark_divelist_changed(TRUE);
}
if (editMode == ADD) {
// clean up the dive data (get duration, depth information from samples)