diff options
author | Yosef Hamza <jo.adam.93@gmail.com> | 2014-04-08 12:30:05 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-04-17 17:51:22 -0700 |
commit | 3027701a14711e175b18462010dab382c2d68c5b (patch) | |
tree | 477a4fafa6326a17447dfafacbed4448a9489460 | |
parent | 55d010bad839b503cbfa759498d18690f4a809ae (diff) | |
download | subsurface-3027701a14711e175b18462010dab382c2d68c5b.tar.gz |
Correctly edit air/water temp in dive struct
When changing the values of air/water temp after the first time and save,
it will be reset the intial value.
This is fixed by removing the "select_dc" (which makes the change to the
dive struct instead).
Fixes #457
Signed-off-by: Yousef Hamza <jo.adama.93@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | qt-ui/maintab.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 594ac562a..ca9523767 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -879,14 +879,14 @@ void MainTab::on_divemaster_textChanged() void MainTab::on_airtemp_textChanged(const QString &text) { - EDIT_SELECTED_DIVES(select_dc(mydive)->airtemp.mkelvin = parseTemperatureToMkelvin(text)); + EDIT_SELECTED_DIVES(mydive->airtemp.mkelvin = parseTemperatureToMkelvin(text)); markChangedWidget(ui.airtemp); validate_temp_field(ui.airtemp, text); } void MainTab::on_watertemp_textChanged(const QString &text) { - EDIT_SELECTED_DIVES(select_dc(mydive)->watertemp.mkelvin = parseTemperatureToMkelvin(text)); + EDIT_SELECTED_DIVES(mydive->watertemp.mkelvin = parseTemperatureToMkelvin(text)); markChangedWidget(ui.watertemp); validate_temp_field(ui.watertemp, text); } |