private static void commitChangePointsOrder(
     OsmandApplication app, List<LatLon> target, List<String> names) {
   TargetPointsHelper targets = app.getTargetPointsHelper();
   List<LatLon> cur = targets.getIntermediatePointsWithTarget();
   boolean eq = true;
   for (int j = 0; j < cur.size() && j < target.size(); j++) {
     if (cur.get(j) != target.get(j)) {
       eq = false;
       break;
     }
   }
   if (!eq) {
     targets.reorderAllTargetPoints(target, names, true);
   }
 }