[macos] Check for implementation before calling -toolTip
Also fixed a couple typos in changelogs.
This commit is contained in:
committed by
Minh Nguyễn
parent
13b97dd0ce
commit
2dae2254dd
@@ -1820,7 +1820,7 @@ public:
|
||||
}
|
||||
|
||||
// Opt into potentially expensive tooltip tracking areas.
|
||||
if (annotation.toolTip.length) {
|
||||
if ([annotation respondsToSelector:@selector(toolTip)] && annotation.toolTip.length) {
|
||||
_wantsToolTipRects = YES;
|
||||
}
|
||||
}
|
||||
@@ -2355,7 +2355,7 @@ public:
|
||||
for (MGLAnnotationTag annotationTag : annotationTags) {
|
||||
MGLAnnotationImage *annotationImage = [self imageOfAnnotationWithTag:annotationTag];
|
||||
id <MGLAnnotation> annotation = [self annotationWithTag:annotationTag];
|
||||
if (annotation.toolTip.length) {
|
||||
if ([annotation respondsToSelector:@selector(toolTip)] && annotation.toolTip.length) {
|
||||
// Add a tooltip tracking area over the annotation image’s
|
||||
// frame, accounting for the image’s alignment rect.
|
||||
NSImage *image = annotationImage.image;
|
||||
|
||||
Reference in New Issue
Block a user