[PATCH] Store user entered 'airtemp' values in the 'divecomputer' struct

Lubomir I. Ivanov neolit123 at gmail.com
Thu Feb 14 07:35:35 PST 2013


From: "Lubomir I. Ivanov" <neolit123 at gmail.com>

Currently there are a couple of places where the air temperature
can be stored. One is in the dive struct directly and one in the
divecomputer struct. It seems that both the statistics.c and
save-xml.c files respect the divecomputer struct temperature,
therefore we might want to store the user entered value
in said struct.

Signed-off-by: Lubomir I. Ivanov <neolit123 at gmail.com>
---
 info.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/info.c b/info.c
index 46b3708..78ee2a7 100644
--- a/info.c
+++ b/info.c
@@ -590,8 +590,8 @@ static void save_dive_info_changes(struct dive *dive, struct dive *master, struc
 		default:
 			mkelvin = 0;
 		}
-		if (mkelvin != dive->airtemp.mkelvin && dive->airtemp.mkelvin == master->airtemp.mkelvin) {
-			dive->airtemp.mkelvin = mkelvin;
+		if (mkelvin != dive->dc.airtemp.mkelvin && dive->dc.airtemp.mkelvin == master->airtemp.mkelvin) {
+			dive->dc.airtemp.mkelvin = mkelvin;
 			changed = 1;
 		}
 	}
-- 
1.7.11.msysgit.0



More information about the subsurface mailing list