summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/command_edit.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-02-24 21:46:11 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-04-12 18:19:07 +0300
commit91c33b475ce85eaf1a987a29938a198415c04799 (patch)
tree298c05348cdffcc073d66b022bb6bb8d5b8f801f /desktop-widgets/command_edit.cpp
parentc4ad477d079d31d24f68b14bda621e0a245fdf1c (diff)
downloadsubsurface-91c33b475ce85eaf1a987a29938a198415c04799.tar.gz
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>
Diffstat (limited to 'desktop-widgets/command_edit.cpp')
-rw-r--r--desktop-widgets/command_edit.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/desktop-widgets/command_edit.cpp b/desktop-widgets/command_edit.cpp
index a1e4de358..7ff714e8f 100644
--- a/desktop-widgets/command_edit.cpp
+++ b/desktop-widgets/command_edit.cpp
@@ -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