From fca7585ffd0b64588dd47cf0282829256ba79c07 Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Fri, 10 Aug 2007 15:43:14 +0300 Subject: [PATCH] Don't use _pos for calculations --- src/cb.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/cb.c b/src/cb.c index ac8e02b..1b578fd 100644 --- a/src/cb.c +++ b/src/cb.c @@ -1254,9 +1254,11 @@ gboolean cb_add_poi(GtkAction * action) gboolean cmenu_cb_loc_set_home(GtkAction * action) { -_pos.unitx = x2unit(_cmenu_position_x); -_pos.unity = y2unit(_cmenu_position_y); -unit2latlon(_pos.unitx, _pos.unity, _home.lat, _home.lon); +guint unitx, unity; + +unitx = x2unit(_cmenu_position_x); +unity = y2unit(_cmenu_position_y); +unit2latlon(unitx, unity, _home.lat, _home.lon); _home.valid=TRUE; config_save_home(); @@ -1265,9 +1267,11 @@ return TRUE; gboolean cmenu_cb_loc_set_destination(GtkAction *action) { -_pos.unitx = x2unit(_cmenu_position_x); -_pos.unity = y2unit(_cmenu_position_y); -unit2latlon(_pos.unitx, _pos.unity, _dest.lat, _dest.lon); +guint unitx, unity; + +unitx = x2unit(_cmenu_position_x); +unity = y2unit(_cmenu_position_y); +unit2latlon(unitx, unity, _dest.lat, _dest.lon); _dest.valid=TRUE; return TRUE; } -- 2.39.5