summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-02-03 11:14:09 -0800
committerMinh Nguyễn <mxn@1ec5.org>2016-02-03 11:14:09 -0800
commite8b8f5e49306e3cc80c2692575703e49129dcb84 (patch)
treeb23cae9ef9861ca500a4cab6856e50242d509732
parent235210c64864e1bbccceb2a551a521ce72cbdadd (diff)
downloadqtlocation-mapboxgl-e8b8f5e49306e3cc80c2692575703e49129dcb84.tar.gz
[ios] Fixed designable warning when showing user location
Turn the Shows User Location inspectable into a no-op when running in the designables agent. Otherwise, we complain that the agent lacks Location Services permissions.
-rw-r--r--platform/ios/src/MGLMapView.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index fdecf2b243..126328b5fd 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -2999,7 +2999,7 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration)
- (void)setShowsUserLocation:(BOOL)showsUserLocation
{
- if (showsUserLocation == _showsUserLocation) return;
+ if (showsUserLocation == _showsUserLocation || _isTargetingInterfaceBuilder) return;
_showsUserLocation = showsUserLocation;