summaryrefslogtreecommitdiff
path: root/src/mbgl
diff options
context:
space:
mode:
authorIvo van Dongen <ivovandongen@users.noreply.github.com>2016-09-20 12:37:34 +0200
committerGitHub <noreply@github.com>2016-09-20 12:37:34 +0200
commit8b0694bc16c0a565c99691283df48b333aef5837 (patch)
treeed5a043155045e380946641cea776e655f591a1c /src/mbgl
parentf3b38df91dc22ddbeec45cd3dbce636253c75037 (diff)
downloadqtlocation-mapboxgl-8b0694bc16c0a565c99691283df48b333aef5837.tar.gz
[core] MapChangeDidFinishLoadingStyle - Ensure style is loaded (#6392)
Diffstat (limited to 'src/mbgl')
-rw-r--r--src/mbgl/style/style.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mbgl/style/style.cpp b/src/mbgl/style/style.cpp
index 1c0d7f5395..4cb267a261 100644
--- a/src/mbgl/style/style.cpp
+++ b/src/mbgl/style/style.cpp
@@ -103,10 +103,7 @@ void Style::setJSON(const std::string& json) {
Log::Error(Event::ParseStyle, "Failed to parse style: %s", util::toString(error).c_str());
observer->onStyleError();
observer->onResourceError(error);
-
return;
- } else {
- observer->onStyleLoaded();
}
for (auto& source : parser.sources) {
@@ -127,6 +124,8 @@ void Style::setJSON(const std::string& json) {
spriteAtlas->load(parser.spriteURL, fileSource);
loaded = true;
+
+ observer->onStyleLoaded();
}
void Style::addSource(std::unique_ptr<Source> source) {