From 88e84b46bb72031f64cc5316a1d9a8fe3fc1c23a Mon Sep 17 00:00:00 2001 From: "r.kuznetsov" Date: Fri, 29 Jan 2016 14:48:14 +0300 Subject: [PATCH] [old-map-downloader] Fixed auto download starting --- map/framework.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/map/framework.cpp b/map/framework.cpp index f35a91fa77..401de4874c 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -960,10 +960,6 @@ void Framework::OnUpdateCountryIndex(storage::TIndex const & currentIndex, m2::P if (currentIndex != newCountryIndex) { - // Enable auto-downloading after return from the world map. - if (!currentIndex.IsValid()) - m_autoDownloadingOn = true; - if (m_autoDownloadingOn && m_autoDownloadListener != nullptr) m_autoDownloadListener(newCountryIndex); @@ -1440,6 +1436,10 @@ void Framework::CreateDrapeEngine(ref_ptr contextFactory, if (!screen.GlobalRect().EqualDxDy(m_currentModelView.GlobalRect(), 1.0E-4)) UpdateUserViewportChanged(); m_currentModelView = screen; + + // Enable auto-downloading after return from the world map. + if (GetDrawScale() <= scales::GetUpperWorldScale()) + m_autoDownloadingOn = true; }); m_drapeEngine->SetTapEventInfoListener(bind(&Framework::OnTapEvent, this, _1, _2, _3, _4)); m_drapeEngine->SetUserPositionListener(bind(&Framework::OnUserPositionChanged, this, _1));