Fix door-to-door sort

This commit is contained in:
Alexander Sytnyk 2017-10-03 11:19:23 +03:00
parent 1c493d0f7d
commit 30811d9f8d

View file

@ -762,8 +762,8 @@ public class PlanRouteFragment extends Fragment implements OsmAndLocationListene
if (i == 0 && startFromLoc) {
continue;
}
int index = sequence[startFromLoc ? i - 1 : i];
res.add(selectedMarkers.get(index));
int index = sequence[i];
res.add(selectedMarkers.get(startFromLoc ? index - 1 : index));
}
return res;
@ -786,8 +786,9 @@ public class PlanRouteFragment extends Fragment implements OsmAndLocationListene
}
mapActivity.getMyApplication().getMapMarkersHelper().addSelectedMarkersToTop(res);
adapter.notifyDataSetChanged();
updateText();
showMarkersRouteOnMap();
}
}.execute();
}