summaryrefslogtreecommitdiff
path: root/src/mbgl/map/map_context.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/map/map_context.cpp')
-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);
}