diff options
author | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2012-11-06 21:57:17 +0000 |
---|---|---|
committer | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2012-11-06 21:57:17 +0000 |
commit | 383f9869be6b0efc64339743fd8545eb29ab4148 (patch) | |
tree | ed17cec7048e5799a77a01a756664b234a781ba0 /navit/navit.c | |
parent | 04a65cc1751d47a46eb8558ede538d85f49ee429 (diff) | |
download | navit-svn-383f9869be6b0efc64339743fd8545eb29ab4148.tar.gz |
Add:Implemented itering over vehicleprofiles
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5262 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/navit.c')
-rw-r--r-- | navit/navit.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/navit/navit.c b/navit/navit.c index 3510596e..a2ec5703 100644 --- a/navit/navit.c +++ b/navit/navit.c @@ -2722,7 +2722,18 @@ navit_get_attr(struct navit *this_, enum attr_type type, struct attr *attr, stru } break; case attr_vehicleprofile: - attr->u.vehicleprofile=this_->vehicleprofile; + if (iter) { + if(iter->u.list) { + iter->u.list=g_list_next(iter->u.list); + } else { + iter->u.list=this_->vehicleprofiles; + } + if(!iter->u.list) + return 0; + attr->u.vehicleprofile=iter->u.list->data; + } else { + attr->u.vehicleprofile=this_->vehicleprofile; + } break; case attr_zoom: attr->u.num=transform_get_scale(this_->trans); |