summaryrefslogtreecommitdiff
path: root/xmlconfig.c
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2007-07-16 22:25:39 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2007-07-16 22:25:39 +0000
commit3b584eb8d1585a1f21c116d06c1dc4388ec37ee4 (patch)
tree1e3e33c0f73c0371289fb56823baca62308210b5 /xmlconfig.c
parent25fe8f00e4496e270e2a58c823581b9676e172bb (diff)
downloadnavit-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.c6
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;
}