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