From 94c8f64316969d775209c398c0ee1e5b4981e2c9 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Wed, 25 Sep 2013 14:30:03 -0300 Subject: 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 --- qt-ui/maintab.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'qt-ui/maintab.cpp') diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 70657039c..c48b89a6c 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -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) -- cgit v1.2.3-70-g09d2