From 3027701a14711e175b18462010dab382c2d68c5b Mon Sep 17 00:00:00 2001 From: Yosef Hamza Date: Tue, 8 Apr 2014 12:30:05 +0200 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/maintab.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'qt-ui') 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); } -- cgit v1.2.3-70-g09d2