summaryrefslogtreecommitdiff
path: root/src/mbgl/style/expression/value.cpp
diff options
context:
space:
mode:
authorAlexander Shalamov <alexander.shalamov@mapbox.com>2019-03-28 00:44:32 +0200
committerAlexander Shalamov <alexander.shalamov@mapbox.com>2019-03-28 22:27:59 +0200
commit4e335d0b050c6d5b94ae0d28cb4fd36b939ad84b (patch)
tree55d8f2e17ba3d7083a648aed4aac9cb366da8bf7 /src/mbgl/style/expression/value.cpp
parent21155772ef086c949f951e32424c36b9dd7dc430 (diff)
downloadqtlocation-mapboxgl-4e335d0b050c6d5b94ae0d28cb4fd36b939ad84b.tar.gz
[core] Traverse expression tree when checking for property overrides
Before this change, symbol layer was only checking whether top level 'text-field' layout property expression is FormatExpression and if it has paint property overrides. This change takes into account that 'text-field' might have nested expressions, thus, requires traversal over child expressions. Fixes: #14254
Diffstat (limited to 'src/mbgl/style/expression/value.cpp')
-rw-r--r--src/mbgl/style/expression/value.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mbgl/style/expression/value.cpp b/src/mbgl/style/expression/value.cpp
index 436ed83ecd..c2c2105336 100644
--- a/src/mbgl/style/expression/value.cpp
+++ b/src/mbgl/style/expression/value.cpp
@@ -166,6 +166,11 @@ mbgl::Value ValueConverter<mbgl::Value>::fromExpressionValue(const Value& value)
}
options.emplace("text-font", std::vector<mbgl::Value>{ std::string("literal"), fontStack });
}
+
+ if (section.textColor) {
+ options.emplace("text-color", fromExpressionValue(*section.textColor));
+ }
+
serialized.push_back(options);
}
return serialized;