diff options
author | Jesse Bounds <jesse@rebounds.net> | 2017-10-24 17:40:47 -0700 |
---|---|---|
committer | Jesse Bounds <jesse@rebounds.net> | 2017-10-24 18:10:23 -0700 |
commit | be1f7c1d4c5fb5c270b0cb5c9d91dc8701c1517d (patch) | |
tree | 8df22175f8de5a1d5d8b327e7d93075836f7f421 | |
parent | 5fa4790fdc24622d85db5fc503bcca9fe8c40b60 (diff) | |
download | qtlocation-mapboxgl-upstream/boundsj-stop-intrinsic-content-size-loop.tar.gz |
Simplify scale bar layout updatesupstream/boundsj-stop-intrinsic-content-size-loop
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 2 | ||||
-rw-r--r-- | platform/ios/src/MGLScaleBar.mm | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 0e76c0c71c..470e57ab5d 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -1016,6 +1016,8 @@ public: - (void)layoutSubviews { [super layoutSubviews]; + + [self.scaleBar invalidateIntrinsicContentSize]; [self adjustContentInset]; diff --git a/platform/ios/src/MGLScaleBar.mm b/platform/ios/src/MGLScaleBar.mm index 410aa7d57e..966555e46a 100644 --- a/platform/ios/src/MGLScaleBar.mm +++ b/platform/ios/src/MGLScaleBar.mm @@ -225,9 +225,6 @@ static const CGFloat MGLFeetPerMeter = 3.28084; CGRectGetMinY(self.frame), size.width, size.height); - - [self invalidateIntrinsicContentSize]; - [self setNeedsLayout]; } - (void)updateVisibility { |