diff options
author | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2007-07-16 22:25:39 +0000 |
---|---|---|
committer | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2007-07-16 22:25:39 +0000 |
commit | 3b584eb8d1585a1f21c116d06c1dc4388ec37ee4 (patch) | |
tree | 1e3e33c0f73c0371289fb56823baca62308210b5 /xmlconfig.c | |
parent | 25fe8f00e4496e270e2a58c823581b9676e172bb (diff) | |
download | navit-svn-3b584eb8d1585a1f21c116d06c1dc4388ec37ee4.tar.gz |
Improved vehicle handling
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/src@353 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'xmlconfig.c')
-rw-r--r-- | xmlconfig.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xmlconfig.c b/xmlconfig.c index 944dd868..5513eac8 100644 --- a/xmlconfig.c +++ b/xmlconfig.c @@ -193,6 +193,7 @@ xmlconfig_vehicle(struct xmlstate *state) const char *value; struct color color; int update=1, follow=0, active; + struct navit_vehicle *nv; if (! s) return 0; @@ -206,8 +207,9 @@ xmlconfig_vehicle(struct xmlstate *state) if ((value=find_attribute(state, "follow", 0))) follow=convert_number(value); active=find_boolean(state, "active", 1, 0); - - navit_vehicle_add(state->parent->element_object, state->element_object, &color, update, follow, active); + nv=navit_add_vehicle(state->parent->element_object, state->element_object, &color, update, follow); + if (active) + navit_set_vehicle(state->parent->element_object, nv); return 1; } |