From d3c20866322463a18a2436e5fc3b8acdc0495dab Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Tue, 7 Aug 2007 04:32:49 +0300 Subject: [PATCH] Use center location if not using gps position when adding POI from the toolbar. --- src/cb.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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; -- 2.39.5