]> err.no Git - mapper/commitdiff
Use correct values for new poi lat, lon
authorKaj-Michael Lang <milang@onion.tal.org>
Sun, 4 Nov 2007 16:23:03 +0000 (18:23 +0200)
committerKaj-Michael Lang <milang@onion.tal.org>
Sun, 4 Nov 2007 16:23:03 +0000 (18:23 +0200)
src/cb.c

index 0ce90de358e97bdf58d99e14a544ee4ca82a467f..da7defc604dbb62d78d201dc056c0e7028bb6c18 100644 (file)
--- 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;
 }