From b31a03d12a05f89e4e3377624258530faaa081bb Mon Sep 17 00:00:00 2001 From: martin-s Date: Tue, 9 Dec 2008 12:36:00 +0000 Subject: [PATCH] Fix:Core:Fixed useless drawing when tracking is disabled git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@1777 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- navit/navit/navit.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/navit/navit/navit.c b/navit/navit/navit.c index e7414fa..d97bf13 100644 --- a/navit/navit/navit.c +++ b/navit/navit/navit.c @@ -1738,15 +1738,16 @@ navit_vehicle_update(struct navit *this_, struct navit_vehicle *nv) if (tracking_update(this_->tracking, &cursor_pc, nv->dir)) { nv->coord.x=cursor_pc.x; nv->coord.y=cursor_pc.y; - if (this_->route && nv->update_curr == 1) { - route_set_position_from_tracking(this_->route, this_->tracking); - callback_list_call_attr_0(this_->attr_cbl, attr_position); - } } - } else { - if (this_->route && nv->update_curr == 1) { - navit_set_position(this_, &cursor_pc); + } + if (nv->update_curr == 1) { + if (this_->route) { + if (this_->tracking && this_->tracking_flag) + route_set_position_from_tracking(this_->route, this_->tracking); + else + route_set_position(this_->route, &cursor_pc); } + callback_list_call_attr_0(this_->attr_cbl, attr_position); } navit_textfile_debug_log(this_, "type=trackpoint_tracked"); transform(this_->trans, pro, &nv->coord, &cursor_pnt, 1, 0); -- 2.7.4