]> err.no Git - mapper/commitdiff
Use center location if not using gps position when adding POI from the toolbar.
authorKaj-Michael Lang <milang@angel.tal.org>
Tue, 7 Aug 2007 01:32:49 +0000 (04:32 +0300)
committerKaj-Michael Lang <milang@angel.tal.org>
Tue, 7 Aug 2007 01:32:49 +0000 (04:32 +0300)
src/cb.c

index b0b92935670ed7348612712b3a98069bbf4b420d..d43a3c189ce69b6a52ae101523a52c2bb0b61224 100644 (file)
--- a/src/cb.c
+++ b/src/cb.c
@@ -1225,8 +1225,12 @@ gboolean cb_add_poi(GtkAction * action)
        guint unitx, unity;
        printf("%s()\n", __PRETTY_FUNCTION__);
 
-       latlon2unit(_gps.lat, _gps.lon, unitx, unity);
-       poi_dialog(ACTION_ADD_POI, unitx, unity);
+       if (_center_mode > 0) {
+               latlon2unit(_gps.lat, _gps.lon, unitx, unity);
+               poi_dialog(ACTION_ADD_POI, unitx, unity);
+       } else {
+               poi_dialog(ACTION_ADD_POI, _center.unitx, _center.unity);
+       }
 
        vprintf("%s(): return TRUE\n", __PRETTY_FUNCTION__);
        return TRUE;