+2007-02-07
+Quy Tonthat <qtonthat@gmail.com>:
+ * Fix bug that causes crashes when click at the right side (outside)
+ of the track graph area in the Track Poperties window.
+
2007-02-06
Jocelyn Jaubert <jocelyn.jaubert@gmail.com>
* Add new information to Track Properties. Postion in time will be
if ( tr->trackpoints )
{
GList *iter = tr->trackpoints->next;
+ GList *last_iter = NULL;
while (iter)
{
current_inc = vik_coord_diff ( &(VIK_TRACKPOINT(iter->data)->coord),
current_dist += current_inc;
if ( current_dist >= dist )
break;
+ last_iter = iter;
iter = iter->next;
}
+ if (!iter) /* passing the end the track */
+ return (last_iter ? last_iter->data : NULL);
/* we've gone past the dist already, was prev trackpoint closer? */
/* should do a vik_coord_average_weighted() thingy. */
if ( iter->prev && abs(current_dist-current_inc-dist) < abs(current_dist-dist) )