From: Kaj-Michael Lang Date: Tue, 7 Aug 2007 01:32:49 +0000 (+0300) Subject: Use center location if not using gps position when adding POI from the toolbar. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3c20866322463a18a2436e5fc3b8acdc0495dab;p=mapper Use center location if not using gps position when adding POI from the toolbar. --- diff --git a/src/cb.c b/src/cb.c index b0b9293..d43a3c1 100644 --- 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;