[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:
committed by
Minh Nguyễn
parent
e4d32b5cbe
commit
b3d4a5cbf8
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1895,8 +1895,8 @@ public:
|
||||
}
|
||||
|
||||
// Choose the first nearby annotation.
|
||||
if (_annotationsNearbyLastClick.size()) {
|
||||
hitAnnotationTag = _annotationsNearbyLastClick.front();
|
||||
if (nearbyAnnotations.size()) {
|
||||
hitAnnotationTag = nearbyAnnotations.front();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user