aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/maintab.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-09-25 14:30:03 -0300
committerGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-09-25 14:30:03 -0300
commit94c8f64316969d775209c398c0ee1e5b4981e2c9 (patch)
tree6b95bd7e1f51c0603117b06f3fe762f286833308 /qt-ui/maintab.cpp
parent2c14f3aa3b44ef9475e5b38acb8bbaa029e662be (diff)
downloadsubsurface-94c8f64316969d775209c398c0ee1e5b4981e2c9.tar.gz
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>
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r--qt-ui/maintab.cpp2
1 files changed, 2 insertions, 0 deletions
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)