diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2017-01-05 03:22:04 -0800 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2017-01-07 15:46:53 -0800 |
commit | 17b3ec1edd217b8b14d64b74cbf58b0e4ae4f241 (patch) | |
tree | 8d7a22ac6f52d5f8463b7c17d609a7d70e784dd9 /platform/macos/app/MapDocument.m | |
parent | d5d6bcee0f2f11cfccb3cc8ee7bc90c4f0ac74e7 (diff) | |
download | qtlocation-mapboxgl-17b3ec1edd217b8b14d64b74cbf58b0e4ae4f241.tar.gz |
[ios, macos] Renamed text-field, text-font, text-font-size, circle-pitch-scale
Reduced the likelihood that the developer might attempt to set textField to an NSTextField or UITextField, or textFont to an NSFont or UIFont, or textSize to a CGSize or NSSize, or circlePitchScale to a number (given iconScale).
Diffstat (limited to 'platform/macos/app/MapDocument.m')
-rw-r--r-- | platform/macos/app/MapDocument.m | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/platform/macos/app/MapDocument.m b/platform/macos/app/MapDocument.m index f00f773bf9..8554772af3 100644 --- a/platform/macos/app/MapDocument.m +++ b/platform/macos/app/MapDocument.m @@ -369,18 +369,18 @@ NS_ARRAY_OF(id <MGLAnnotation>) *MBXFlattenedShapes(NS_ARRAY_OF(id <MGLAnnotatio return localizedString; }; - if ([layer.textField isKindOfClass:[MGLStyleConstantValue class]]) { - NSString *textField = [(MGLStyleConstantValue<NSString *> *)layer.textField rawValue]; - layer.textField = [MGLStyleValue<NSString *> valueWithRawValue:stringByLocalizingString(textField)]; - } else if ([layer.textField isKindOfClass:[MGLStyleFunction class]]) { - MGLStyleFunction *function = (MGLStyleFunction<NSString *> *)layer.textField; + if ([layer.text isKindOfClass:[MGLStyleConstantValue class]]) { + NSString *textField = [(MGLStyleConstantValue<NSString *> *)layer.text rawValue]; + layer.text = [MGLStyleValue<NSString *> valueWithRawValue:stringByLocalizingString(textField)]; + } else if ([layer.text isKindOfClass:[MGLStyleFunction class]]) { + MGLStyleFunction *function = (MGLStyleFunction<NSString *> *)layer.text; NSMutableDictionary *stops = function.stops.mutableCopy; [stops enumerateKeysAndObjectsUsingBlock:^(NSNumber *zoomLevel, MGLStyleConstantValue<NSString *> *stop, BOOL *done) { NSString *textField = stop.rawValue; stops[zoomLevel] = [MGLStyleValue<NSString *> valueWithRawValue:stringByLocalizingString(textField)]; }]; function.stops = stops; - layer.textField = function; + layer.text = function; } } } |