[core] clear the render order when we're loading a new style

regression introduced by #2908
This commit is contained in:
Konstantin Käfer
2015-11-06 16:42:44 +01:00
parent cb92290f9d
commit ec1a58d8ef

View File

@@ -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);
}