From: Kaj-Michael Lang Date: Fri, 10 Aug 2007 12:43:14 +0000 (+0300) Subject: Don't use _pos for calculations X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fca7585ffd0b64588dd47cf0282829256ba79c07;p=mapper Don't use _pos for calculations --- 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; }