From: Kaj-Michael Lang Date: Sun, 4 Nov 2007 16:23:03 +0000 (+0200) Subject: Use correct values for new poi lat, lon X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c40bfc973eccc905c7b3d7981d894ebe3fdf4bb;p=mapper Use correct values for new poi lat, lon --- diff --git a/src/cb.c b/src/cb.c index 0ce90de..da7defc 100644 --- a/src/cb.c +++ b/src/cb.c @@ -1003,11 +1003,15 @@ return TRUE; gboolean cmenu_cb_loc_add_poi(GtkAction * action) { +guint ux, uy; poi_info *poi; + poi=poi_new(); -poi->lat=x2unit(_cmenu_position_x); -poi->lon=y2unit(_cmenu_position_y); +ux=x2unit(_cmenu_position_x); +uy=y2unit(_cmenu_position_y); +unit2latlon(ux, uy, poi->lat, poi->lon); poi_edit_dialog(ACTION_ADD_POI, poi); + return TRUE; }