From 6ff9d8ac626d08e46c57557463994e096ffc9c1b Mon Sep 17 00:00:00 2001 From: Mikhail Pozdnyakov Date: Fri, 15 Nov 2019 19:47:43 +0200 Subject: [core] Sort style sources before orchestration --- src/mbgl/style/style_impl.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mbgl/style/style_impl.cpp b/src/mbgl/style/style_impl.cpp index 95a39819fc..6aa80d3802 100644 --- a/src/mbgl/style/style_impl.cpp +++ b/src/mbgl/style/style_impl.cpp @@ -347,7 +347,13 @@ Immutable>> Style::Impl::getImageImpls() cons } Immutable>> Style::Impl::getSourceImpls() const { - return sources.getImpls(); + auto impls = sources.getImpls(); + mutate(impls, [&] (auto& impls_) { + std::sort(impls_.begin(), impls_.end(), [](const auto& a, const auto& b) { + return a->id < b->id; + }); + }); + return impls; } Immutable>> Style::Impl::getLayerImpls() const { -- cgit v1.2.1