forked from organicmaps/organicmaps
Call FeatureType::GetLimitRect after all minor checks.
This commit is contained in:
parent
ad4d681fa5
commit
23fc0090ee
1 changed files with 8 additions and 7 deletions
|
@ -84,19 +84,14 @@ void RuleDrawer::operator()(FeatureType const & f)
|
|||
if (CheckCancelled())
|
||||
return;
|
||||
|
||||
int const zoomLevel = m_context->GetTileKey().m_zoomLevel;
|
||||
|
||||
m2::RectD const limitRect = f.GetLimitRect(zoomLevel);
|
||||
|
||||
if (!m_globalRect.IsIntersect(limitRect))
|
||||
return;
|
||||
|
||||
Stylist s;
|
||||
m_callback(f, s);
|
||||
|
||||
if (s.IsEmpty())
|
||||
return;
|
||||
|
||||
int const zoomLevel = m_context->GetTileKey().m_zoomLevel;
|
||||
|
||||
if (s.IsCoastLine() &&
|
||||
zoomLevel > scales::GetUpperWorldScale() &&
|
||||
f.GetID().m_mwmId.GetInfo()->GetType() == MwmInfo::COASTS)
|
||||
|
@ -115,6 +110,12 @@ void RuleDrawer::operator()(FeatureType const & f)
|
|||
}
|
||||
}
|
||||
|
||||
// FeatureType::GetLimitRect call invokes full geometry reading and decoding.
|
||||
// That's why this code follows after all lightweight return options.
|
||||
m2::RectD const limitRect = f.GetLimitRect(zoomLevel);
|
||||
if (!m_globalRect.IsIntersect(limitRect))
|
||||
return;
|
||||
|
||||
#ifdef DEBUG
|
||||
// Validate on feature styles
|
||||
if (s.AreaStyleExists() == false)
|
||||
|
|
Loading…
Add table
Reference in a new issue