diff options
author | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2019-03-28 00:44:32 +0200 |
---|---|---|
committer | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2019-03-28 22:27:59 +0200 |
commit | 4e335d0b050c6d5b94ae0d28cb4fd36b939ad84b (patch) | |
tree | 55d8f2e17ba3d7083a648aed4aac9cb366da8bf7 /src/mbgl/style/expression/value.cpp | |
parent | 21155772ef086c949f951e32424c36b9dd7dc430 (diff) | |
download | qtlocation-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.cpp | 5 |
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; |