summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnsis Brammanis <ansis@mapbox.com>2018-02-21 11:36:40 -0500
committerChris Loer <chris.loer@mapbox.com>2018-03-19 15:31:38 -0700
commitef1dcc0d5b5ae23b303ca736168f1452ea36ae77 (patch)
treec50aba4cd60b826600c8342a40b81fbb13368a52
parentf0110350176e48e4ee2bac7a923287444f85dbea (diff)
downloadqtlocation-mapboxgl-ef1dcc0d5b5ae23b303ca736168f1452ea36ae77.tar.gz
[core] don't hide icons if text is an empty string
-rw-r--r--platform/node/test/ignores.json1
-rw-r--r--src/mbgl/text/placement.cpp6
2 files changed, 3 insertions, 4 deletions
diff --git a/platform/node/test/ignores.json b/platform/node/test/ignores.json
index 840daa2049..702cadcbaa 100644
--- a/platform/node/test/ignores.json
+++ b/platform/node/test/ignores.json
@@ -39,7 +39,6 @@
"render-tests/regressions/mapbox-gl-js#5599": "https://github.com/mapbox/mapbox-gl-native/issues/10399",
"render-tests/regressions/mapbox-gl-js#5740": "https://github.com/mapbox/mapbox-gl-native/issues/10619",
"render-tests/regressions/mapbox-gl-js#5982": "https://github.com/mapbox/mapbox-gl-native/issues/10619",
- "render-tests/regressions/mapbox-gl-js#6160": "https://github.com/mapbox/mapbox-gl-native/pull/11206",
"render-tests/regressions/mapbox-gl-native#7357": "https://github.com/mapbox/mapbox-gl-native/issues/7357",
"render-tests/runtime-styling/image-add-sdf": "https://github.com/mapbox/mapbox-gl-native/issues/9847",
"render-tests/runtime-styling/paint-property-fill-flat-to-extrude": "https://github.com/mapbox/mapbox-gl-native/issues/6745",
diff --git a/src/mbgl/text/placement.cpp b/src/mbgl/text/placement.cpp
index fc24c78902..54b2b7539b 100644
--- a/src/mbgl/text/placement.cpp
+++ b/src/mbgl/text/placement.cpp
@@ -95,9 +95,6 @@ void Placement::placeLayerBucket(
auto partiallyEvaluatedTextSize = bucket.textSizeBinder->evaluateForZoom(state.getZoom());
auto partiallyEvaluatedIconSize = bucket.iconSizeBinder->evaluateForZoom(state.getZoom());
- const bool iconWithoutText = !bucket.hasTextData() || bucket.layout.get<style::TextOptional>();
- const bool textWithoutIcon = !bucket.hasIconData() || bucket.layout.get<style::IconOptional>();
-
for (auto& symbolInstance : bucket.symbolInstances) {
if (seenCrossTileIDs.count(symbolInstance.crossTileID) == 0) {
@@ -140,6 +137,9 @@ void Placement::placeLayerBucket(
offscreen &= placed.second;
}
+ const bool iconWithoutText = !symbolInstance.hasText || bucket.layout.get<style::TextOptional>();
+ const bool textWithoutIcon = !symbolInstance.hasIcon || bucket.layout.get<style::IconOptional>();
+
// combine placements for icon and text
if (!iconWithoutText && !textWithoutIcon) {
placeText = placeIcon = placeText && placeIcon;