From 822d5a89de6de594e62e3e25e4d600fb97ab84f0 Mon Sep 17 00:00:00 2001 From: tinloaf Date: Tue, 25 Nov 2008 21:49:58 +0000 Subject: [PATCH] Fix:Core:Remove the "lagging" old route if the user moved the map manually. git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@1759 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- navit/navit/navit.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/navit/navit/navit.c b/navit/navit/navit.c index d6c8a1a..4812adc 100644 --- a/navit/navit/navit.c +++ b/navit/navit/navit.c @@ -1753,9 +1753,13 @@ navit_vehicle_update(struct navit *this_, struct navit_vehicle *nv) #endif if (this_->route && nv->update_curr == 1) navigation_update(this_->navigation, this_->route); - if (this_->cursor_flag && nv->follow_curr == 1 && ((time(NULL) - this_->last_moved) > this_->center_timeout) && (this_->button_pressed != 1)) { - navit_set_center_cursor(this_, &nv->coord, nv->dir, 50, 80); - pnt=NULL; + if ((nv->follow_curr == 1) && (!this_->button_pressed)) { + if (this_->cursor_flag && ((time(NULL) - this_->last_moved) > this_->center_timeout)) { + navit_set_center_cursor(this_, &nv->coord, nv->dir, 50, 80); + pnt=NULL; + } else { // We don't want to center, but redraw because otherwise the old route "lags" + navit_draw(this_); + } } if (pnt && this_->route && !route_path_set && route_get_path_set(this_->route)) navit_draw(this_); -- 2.7.4