[core] Swap order of Style::recalculate and Style::relayout

Style::relayout uses source.baseImpl->loaded, a flag which is updated by Style::recalculate. So recalculate first, then relayout.
This commit is contained in:
Ivo van Dongen
2016-11-30 15:34:40 +02:00
committed by John Firebaugh
parent b0a928dcbc
commit 28be37fcbe
2 changed files with 5 additions and 5 deletions

View File

@@ -253,10 +253,6 @@ void Map::Impl::update() {
annotationManager->updateData();
}
if (updateFlags & Update::Layout) {
style->relayout();
}
if (updateFlags & Update::Classes) {
style->cascade(timePoint, mode);
}
@@ -265,6 +261,10 @@ void Map::Impl::update() {
style->recalculate(transform.getZoom(), timePoint, mode);
}
if (updateFlags & Update::Layout) {
style->relayout();
}
style::UpdateParameters parameters(pixelRatio,
debugOptions,
transform.getState(),