Fix:Core:Recalculate path when vehicleprofile changes
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Mon, 27 Jul 2009 11:22:07 +0000 (11:22 +0000)
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Mon, 27 Jul 2009 11:22:07 +0000 (11:22 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@2414 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/route.c

index 8c5a31e..67c21cf 100644 (file)
@@ -496,7 +496,12 @@ route_set_mapset(struct route *this, struct mapset *ms)
 void
 route_set_profile(struct route *this, struct vehicleprofile *prof)
 {
-       this->vehicleprofile=prof;
+       if (this->vehicleprofile != prof) {
+               this->vehicleprofile=prof;
+               route_path_destroy(this->path2);
+               this->path2 = NULL;
+               route_path_update(this, 0, 0);
+       }
 }
 
 /**