mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
55d010bad8
commit
3027701a14
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue