aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2013-02-24 18:29:10 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-02-24 08:50:49 -0800
commitafac4e71f44d542fb0117bdf4eac6a7fb28b2ccb (patch)
tree570057574c4cfb39b25cb439c2edd12f2aee0a68
parent69062034b3c184de1a3902c14611a1b3f8a9c384 (diff)
downloadsubsurface-afac4e71f44d542fb0117bdf4eac6a7fb28b2ccb.tar.gz
Remove rounding of the value for minutes when editing dive date/time
For the "Edit dive date/time" dialog, (time->tm_min / 5)*5) with integers can lose precision due to truncation, showing for example a value of 55, where 59 is the actual previsouly stored value. Reported-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--info.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/info.c b/info.c
index 2fe6e470b..44026bd22 100644
--- a/info.c
+++ b/info.c
@@ -1122,7 +1122,7 @@ GtkWidget *create_date_time_widget(struct tm *time, GtkWidget **cal, GtkWidget *
gtk_calendar_select_month(GTK_CALENDAR(*cal), time->tm_mon, time->tm_year + 1900);
gtk_calendar_select_day(GTK_CALENDAR(*cal), time->tm_mday);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(*h), time->tm_hour);
- gtk_spin_button_set_value(GTK_SPIN_BUTTON(*m), (time->tm_min / 5)*5);
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(*m), time->tm_min);
gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(*h), TRUE);
gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(*m), TRUE);