Undo: move temperature update from MainTab to EditWaterTemp

The code in maintab is not called anymore (unless cylinders
or weightsystems are changed). Move the code to the command
that edits water temperature.

This should be audited as it is unclear weather this is
necessary.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2019-02-24 21:46:11 +01:00 committed by Dirk Hohndel
parent c4ad477d07
commit 91c33b475c
2 changed files with 4 additions and 11 deletions

View file

@ -230,6 +230,9 @@ DiveField EditAirTemp::fieldId() const
void EditWaterTemp::set(struct dive *d, int value) const
{
d->watertemp.mkelvin = value > 0 ? (uint32_t)value : 0u;
// re-populate the temperatures - easiest way to do this is by calling fixup_dive
fixup_dive(d);
}
int EditWaterTemp::data(struct dive *d) const