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>
This commit is contained in:
Dirk Hohndel 2013-12-01 20:17:17 -08:00
parent dc03b7e7d6
commit 502a514e91

View file

@ -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();