From 6e329c8681501ef734217918218d6d0145df7744 Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Thu, 18 Oct 2007 17:19:38 +0300 Subject: [PATCH] Update map location data in a idle cb for goto function. --- src/map.c | 2 +- src/map.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/map.c b/src/map.c index 3bac8e4..1ea1b5c 100644 --- a/src/map.c +++ b/src/map.c @@ -524,7 +524,7 @@ if (pos->valid==FALSE) { _center_mode=CENTER_MANUAL; map_center_latlon(pos->lat, pos->lon); map_set_autozoom(FALSE); -map_update_location_from_center(); +g_idle_add((GSourceFunc)map_update_location_from_center, NULL); return TRUE; } diff --git a/src/map.h b/src/map.h index 0ed428d..44fd6f0 100644 --- a/src/map.h +++ b/src/map.h @@ -80,6 +80,7 @@ void map_set_mark(void); void map_center_unit(guint new_center_unitx, guint new_center_unity); void map_center_latlon(gdouble lat, gdouble lon); gboolean map_goto_position(Position *pos); +gboolean map_update_location_from_center(void); gboolean map_cb_configure(GtkWidget * widget, GdkEventConfigure * event); gboolean map_cb_expose(GtkWidget * widget, GdkEventExpose * event); -- 2.39.5