summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2015-11-06 16:42:44 +0100
committerKonstantin Käfer <mail@kkaefer.com>2015-11-06 16:42:44 +0100
commitec1a58d8effb3292ec46cca3fcad17218fa8c016 (patch)
tree2e8f53015d626b5985295b94d18273cfd09a8f75 /src
parentcb92290f9d486b7ece7168e1b42e5572a2b2c40c (diff)
downloadqtlocation-mapboxgl-ec1a58d8effb3292ec46cca3fcad17218fa8c016.tar.gz
[core] clear the render order when we're loading a new style
regression introduced by #2908
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/map/map_context.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mbgl/map/map_context.cpp b/src/mbgl/map/map_context.cpp
index 9f803c87c9..f0e1412c3b 100644
--- a/src/mbgl/map/map_context.cpp
+++ b/src/mbgl/map/map_context.cpp
@@ -97,6 +97,9 @@ void MapContext::setStyleURL(const std::string& url) {
styleJSON.clear();
style = std::make_unique<Style>(data);
+ if (painter) {
+ painter->updateRenderOrder(*style);
+ }
const size_t pos = styleURL.rfind('/');
std::string base = "";
@@ -135,6 +138,9 @@ void MapContext::setStyleJSON(const std::string& json, const std::string& base)
styleJSON = json;
style = std::make_unique<Style>(data);
+ if (painter) {
+ painter->updateRenderOrder(*style);
+ }
loadStyleJSON(json, base);
}