summaryrefslogtreecommitdiff
path: root/src/mbgl/geometry
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-01-09 13:05:13 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-01-10 10:15:22 -0800
commite7778509c546f4d1e0dd73e2d1deceb146c90de2 (patch)
treed8101c341d45a6a011cb37101f486814be7a6259 /src/mbgl/geometry
parentea4c0b77c39926c770b0003097509e36dc26621d (diff)
downloadqtlocation-mapboxgl-e7778509c546f4d1e0dd73e2d1deceb146c90de2.tar.gz
[core] Fix flickering caused by regression in #7586
It should be safe to invoke GeometryTileWorker::setData multiple times without invoking GeometryTileWorker::setLayers. Therefore GeometryTileWorker::redoLayout() must not consume the layers.
Diffstat (limited to 'src/mbgl/geometry')
-rw-r--r--src/mbgl/geometry/feature_index.cpp4
-rw-r--r--src/mbgl/geometry/feature_index.hpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/mbgl/geometry/feature_index.cpp b/src/mbgl/geometry/feature_index.cpp
index a04d9e0606..5019d888ca 100644
--- a/src/mbgl/geometry/feature_index.cpp
+++ b/src/mbgl/geometry/feature_index.cpp
@@ -151,8 +151,8 @@ optional<GeometryCoordinates> FeatureIndex::translateQueryGeometry(
return translated;
}
-void FeatureIndex::addBucketLayerName(const std::string& bucketName, const std::string& layerID) {
- bucketLayerIDs[bucketName].push_back(layerID);
+void FeatureIndex::setBucketLayerIDs(const std::string& bucketName, const std::vector<std::string>& layerIDs) {
+ bucketLayerIDs[bucketName] = layerIDs;
}
} // namespace mbgl
diff --git a/src/mbgl/geometry/feature_index.hpp b/src/mbgl/geometry/feature_index.hpp
index 662e78aa2c..ca813f4b6b 100644
--- a/src/mbgl/geometry/feature_index.hpp
+++ b/src/mbgl/geometry/feature_index.hpp
@@ -52,7 +52,7 @@ public:
const float bearing,
const float pixelsToTileUnits);
- void addBucketLayerName(const std::string& bucketName, const std::string& layerName);
+ void setBucketLayerIDs(const std::string& bucketName, const std::vector<std::string>& layerIDs);
private:
void addFeature(