diff options
Diffstat (limited to 'src/mbgl/style/style.cpp')
-rw-r--r-- | src/mbgl/style/style.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mbgl/style/style.cpp b/src/mbgl/style/style.cpp index 8dfe7eac06..0bc1841566 100644 --- a/src/mbgl/style/style.cpp +++ b/src/mbgl/style/style.cpp @@ -164,6 +164,8 @@ void Style::addSource(std::unique_ptr<Source> source) { } source->baseImpl->setObserver(this); + source->baseImpl->loadDescription(fileSource); + sources.emplace_back(std::move(source)); } @@ -387,9 +389,6 @@ void Style::recalculate(float z, const TimePoint& timePoint, MapMode mode) { // If this layer has a source, make sure that it gets loaded. if (Source* source = getSource(layer->baseImpl.source)) { source->baseImpl->enabled = true; - if (!source->baseImpl->loaded) { - source->baseImpl->loadDescription(fileSource); - } } } |