From b2a3314192a8a1dc06e0677e1430219dd8655cf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Thu, 2 Jul 2015 18:39:06 +0200 Subject: [PATCH] replace Style object immediately this makes sure that adding custom sprite imagery will add them to the new Style object rather than the old one in case a user adds new custom sprites immediately after changing a stylesheet --- src/mbgl/map/map_context.cpp | 12 +++++++++--- src/mbgl/style/style.cpp | 8 ++++---- src/mbgl/style/style.hpp | 6 +++--- test/style/resource_loading.cpp | 3 ++- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/src/mbgl/map/map_context.cpp b/src/mbgl/map/map_context.cpp index a27d7301a..5b1825bff 100644 --- a/src/mbgl/map/map_context.cpp +++ b/src/mbgl/map/map_context.cpp @@ -99,6 +99,8 @@ void MapContext::setStyleURL(const std::string& url) { styleURL = url; styleJSON.clear(); + style = std::make_unique