summaryrefslogtreecommitdiff
path: root/src/mbgl/layout/symbol_layout.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/layout/symbol_layout.cpp')
-rw-r--r--src/mbgl/layout/symbol_layout.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mbgl/layout/symbol_layout.cpp b/src/mbgl/layout/symbol_layout.cpp
index 1772d1ef91..1f447ddc9f 100644
--- a/src/mbgl/layout/symbol_layout.cpp
+++ b/src/mbgl/layout/symbol_layout.cpp
@@ -555,9 +555,10 @@ void SymbolLayout::addFeature(const std::size_t layoutFeatureIndex,
IndexedSubfeature indexedFeature(feature.index, sourceLayer->getName(), bucketLeaderID, symbolInstances.size());
const auto iconTextFit = evaluatedLayoutProperties.get<style::IconTextFit>();
+ const bool hasIconTextFit = iconTextFit != IconTextFitType::None;
// Adjust shaped icon size when icon-text-fit is used.
optional<PositionedIcon> verticallyShapedIcon;
- if (shapedIcon && iconTextFit != IconTextFitType::None) {
+ if (shapedIcon && hasIconTextFit) {
// Create vertically shaped icon for vertical writing mode if needed.
if (allowVerticalPlacement && shapedTextOrientations.vertical) {
verticallyShapedIcon = shapedIcon;
@@ -602,6 +603,7 @@ void SymbolLayout::addFeature(const std::size_t layoutFeatureIndex,
imageMap,
iconRotation,
iconType,
+ hasIconTextFit,
allowVerticalPlacement);
};