void Navigator::SetFromRect(m2::AnyRectD const & r, uint32_t tileSize, double visualScale) { m2::RectD const & worldR = df::GetWorldRect(); ScreenBase tmp = m_Screen; tmp.SetFromRect(r); tmp = ScaleInto(tmp, worldR); if (!CheckMaxScale(tmp, tileSize, visualScale)) { int const scale = scales::GetUpperStyleScale() - 1; m2::RectD newRect = df::GetRectForDrawScale(scale, r.Center()); CheckMinMaxVisibleScale(newRect, scale); tmp = m_Screen; tmp.SetFromRect(m2::AnyRectD(newRect)); ASSERT(CheckMaxScale(tmp, tileSize, visualScale), ()); }