summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2016-04-21 20:15:18 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2016-04-21 20:15:18 +0300
commit4e04a107e85a2118df12415cc661b8edb1fa36f4 (patch)
tree879d325008f8fedc621465f01795f0847b2e78d8 /src
parent3ee9d12013afd7f513f6a2f41c98684e824e5a60 (diff)
downloadqtlocation-mapboxgl-4e04a107e85a2118df12415cc661b8edb1fa36f4.tar.gz
Revert "[core] Do not clear custom layers upon style switch"
This reverts commit 8ec875b87c387713d7e4df5c90e6cac7669ed38b.
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/style/style.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mbgl/style/style.cpp b/src/mbgl/style/style.cpp
index b239ac20dc..010f0aeafd 100644
--- a/src/mbgl/style/style.cpp
+++ b/src/mbgl/style/style.cpp
@@ -70,9 +70,7 @@ Style::Style(FileSource& fileSource_, float pixelRatio)
void Style::setJSON(const std::string& json, const std::string&) {
sources.clear();
- layers.erase(std::remove_if(layers.begin(), layers.end(), [](const auto& layer) {
- return !layer->template is<CustomLayer>();
- }), layers.end());
+ layers.clear();
classes.clear();
StyleParser parser;