fix condition

This commit is contained in:
sonora 2016-08-09 18:13:46 +02:00
parent 714d405e9c
commit 181566f295

View file

@ -814,9 +814,10 @@ public class RouteCalculationResult {
cacheAgreggatedDirections = new ArrayList<RouteDirectionInfo>();
RouteDirectionInfo p = null;
for(RouteDirectionInfo i : list) {
if(p == null || !i.getTurnType().isSkipToSpeak() ||
(!Algorithms.objectEquals(p.getRef(), i.getRef()) &&
!Algorithms.objectEquals(p.getStreetName(), i.getStreetName()))) {
// if(p == null || !i.getTurnType().isSkipToSpeak() ||
// (!Algorithms.objectEquals(p.getRef(), i.getRef()) &&
// !Algorithms.objectEquals(p.getStreetName(), i.getStreetName()))) {
if(i.getTurnType() != null && !i.getTurnType().isSkipToSpeak()) {
p = new RouteDirectionInfo(i.getAverageSpeed(), i.getTurnType());
p.routePointOffset = i.routePointOffset;
p.routeEndPointOffset = i.routeEndPointOffset;