[ios, osx] Find nearby annotation when not persisting query

Fixed an issue that made the osxapp context menu only apply to the right-clicked pin after first selecting the pin. This also happened to be a latent bug in the iOS implementation.
This commit is contained in:
Minh Nguyễn
2016-05-09 13:13:31 -07:00
committed by Minh Nguyễn
parent e4d32b5cbe
commit b3d4a5cbf8
2 changed files with 4 additions and 4 deletions

View File

@@ -3142,9 +3142,9 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration)
}
// Choose the first nearby annotation.
if (_annotationsNearbyLastTap.size())
if (nearbyAnnotations.size())
{
hitAnnotationTag = _annotationsNearbyLastTap.front();
hitAnnotationTag = nearbyAnnotations.front();
}
}
}

View File

@@ -1895,8 +1895,8 @@ public:
}
// Choose the first nearby annotation.
if (_annotationsNearbyLastClick.size()) {
hitAnnotationTag = _annotationsNearbyLastClick.front();
if (nearbyAnnotations.size()) {
hitAnnotationTag = nearbyAnnotations.front();
}
}
}