diff options
author | Dane Springmeyer <dane@mapbox.com> | 2019-08-30 16:29:02 -0700 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2019-09-03 11:24:32 +0200 |
commit | 861d5d67ba5b52cbf702f16d4b13aef4a772d287 (patch) | |
tree | b9d36368491a8e03ecf435215a75a616b7059065 | |
parent | c929d53a695253717c4c56d6d30f0c1e0ed4bfab (diff) | |
download | qtlocation-mapboxgl-upstream/always-call-source-load-observers.tar.gz |
[core] add sources to source collection before triggering loadupstream/always-call-source-load-observers
-rw-r--r-- | src/mbgl/style/style_impl.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mbgl/style/style_impl.cpp b/src/mbgl/style/style_impl.cpp index 10fee73cdd..d3298c5cac 100644 --- a/src/mbgl/style/style_impl.cpp +++ b/src/mbgl/style/style_impl.cpp @@ -140,9 +140,8 @@ void Style::Impl::addSource(std::unique_ptr<Source> source) { } source->setObserver(this); - source->loadDescription(fileSource); - - sources.add(std::move(source)); + auto item = sources.add(std::move(source)); + item->loadDescription(fileSource); } std::unique_ptr<Source> Style::Impl::removeSource(const std::string& id) { |