Fix : wrong leg calculation if previous turnpoint is same as current.

this cause wrong Task lenght in Task edit dialog and wrong task covered percent of task in bottom bar.