summaryrefslogtreecommitdiff
path: root/navit/vehicle/demo/vehicle_demo.c
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2009-02-04 15:29:36 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2009-02-04 15:29:36 +0000
commit1d00c98b1b15612df8e88a9f9522518217d6e2f5 (patch)
tree8eb58ea7d9f226dd273de4281d6533067635de6d /navit/vehicle/demo/vehicle_demo.c
parent02ec48734235e2400659c469a467a50ceb5baccc (diff)
downloadnavit-1d00c98b1b15612df8e88a9f9522518217d6e2f5.tar.gz
Fix:Core:Made zoom_to_route work better
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@2005 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/vehicle/demo/vehicle_demo.c')
-rw-r--r--navit/vehicle/demo/vehicle_demo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/navit/vehicle/demo/vehicle_demo.c b/navit/vehicle/demo/vehicle_demo.c
index e922a0bb0..76d56349e 100644
--- a/navit/vehicle/demo/vehicle_demo.c
+++ b/navit/vehicle/demo/vehicle_demo.c
@@ -110,7 +110,9 @@ vehicle_demo_timer(struct vehicle_priv *priv)
if (route_map)
mr=map_rect_new(route_map, NULL);
if (mr)
- item=map_rect_get_item(mr);
+ item=map_rect_get_item(mr);
+ if (item && item->type == type_route_start)
+ item=map_rect_get_item(mr);
if (item && item_coord_get(item, &pos, 1)) {
priv->position_set=0;
dbg(1, "current pos=0x%x,0x%x\n", pos.x, pos.y);