diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2016-09-26 17:26:15 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2016-10-27 16:15:36 -0700 |
commit | 91272992f3a7ca7baa124c3378f1c1e2b3e5bb76 (patch) | |
tree | f76b6293a302b3986dbf42a8e0b0f5975c31b677 /src | |
parent | e7bfa7849e4ed7a80d27b63ac2f504660ecfb14b (diff) | |
download | qtlocation-mapboxgl-91272992f3a7ca7baa124c3378f1c1e2b3e5bb76.tar.gz |
[core] don't load tiles from sources that aren't used
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/style/style.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mbgl/style/style.cpp b/src/mbgl/style/style.cpp index e1cbe56bc5..0605a66d80 100644 --- a/src/mbgl/style/style.cpp +++ b/src/mbgl/style/style.cpp @@ -214,15 +214,18 @@ double Style::getDefaultPitch() const { void Style::updateTiles(const UpdateParameters& parameters) { for (const auto& source : sources) { - source->baseImpl->updateTiles(parameters); + if (source->baseImpl->enabled) { + source->baseImpl->updateTiles(parameters); + } } } void Style::relayout() { for (const auto& sourceID : updateBatch.sourceIDs) { Source* source = getSource(sourceID); - if (!source) continue; - source->baseImpl->reloadTiles(); + if (source && source->baseImpl->enabled) { + source->baseImpl->reloadTiles(); + } } updateBatch.sourceIDs.clear(); } |