summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-12-01 20:17:17 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-12-01 20:17:17 -0800
commit502a514e919efee172f216acab5a3c8e73931e1d (patch)
tree45768b1d721b41ad6a27ddcc00221ad232148e56
parentdc03b7e7d689156c14a036283702944a8ca4d767 (diff)
downloadsubsurface-502a514e919efee172f216acab5a3c8e73931e1d.tar.gz
Reflect air and water temperature changes in dive info
When editing air or water temperature, you are actually editing the information in the active divecomputer structure. But the Dive Info shows the summary data created from the temperature data in all dive computers. For most people who will only ever have one divecomputer per dive this may seem like an artificial distinction, but it's very important if you track more than one computer. So in order to have an edit reflected in what's shown, we must redo the "summary creation" for data from the different divecomputers into the summary fields of the dive. Fixes #313 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/maintab.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index cf9a30c21..a5d86846d 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -588,6 +588,12 @@ void MainTab::acceptChanges()
mark_divelist_changed(TRUE);
DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::NOTHING);
}
+ // each dive that was selected might have had the temperatures in its active divecomputer changed
+ // so re-populate the temperatures - easiest way to do this is by calling fixup_dive
+ Q_FOREACH(dive *d, notesBackup.keys()) {
+ fixup_dive(d);
+ }
+
editMode = NONE;
resetPallete();