/**
* gtk_map_add_path:
* @path: A path object to add to the map
- * @current: Is this the current track ?
+ * @current: Is this the current track/route ?
*
* Adds a new path to the map.
*/
}
g_object_ref(path);
priv->paths=g_slist_append(priv->paths, path);
-if (current==TRUE)
- priv->current_track=path;
+if (current==TRUE) {
+ switch (path->type) {
+ case PATH_TYPE_ROUTE:
+ priv->current_track=path;
+ break;
+ case PATH_TYPE_TRACK:
+ priv->current_track=path;
+ break;
+ default: ;
+ }
+}
gtk_map_refresh(widget);
return TRUE;
}