diff --git a/map/framework.cpp b/map/framework.cpp index 746d5dce4d..b1a8da371b 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -81,6 +81,7 @@ void Framework::OnCompassUpdate(location::CompassInfo const & info) Framework::Framework() : m_hasPendingInvalidate(false), m_doForceUpdate(false), + m_queryMaxScaleMode(false), m_metresMinWidth(10), m_metresMaxWidth(1000000), #if defined(OMIM_OS_MAC) || defined(OMIM_OS_WINDOWS) || defined(OMIM_OS_LINUX) @@ -258,11 +259,13 @@ void Framework::DrawModel(shared_ptr const & e, try { + int const scale = (m_queryMaxScaleMode ? 17 : scaleLevel); + //threads::MutexGuard lock(m_modelSyn); if (m_renderPolicy->IsTiling()) - m_model.ForEachFeature_TileDrawing(selectRect, doDraw, scaleLevel); + m_model.ForEachFeature_TileDrawing(selectRect, doDraw, scale); else - m_model.ForEachFeature(selectRect, doDraw, scaleLevel); + m_model.ForEachFeature(selectRect, doDraw, scale); } catch (redraw_operation_cancelled const &) { diff --git a/map/framework.hpp b/map/framework.hpp index d54091aff5..35ab175f87 100644 --- a/map/framework.hpp +++ b/map/framework.hpp @@ -66,8 +66,7 @@ protected: Navigator m_navigator; scoped_ptr m_renderPolicy; - bool m_hasPendingInvalidate; - bool m_doForceUpdate; + bool m_hasPendingInvalidate, m_doForceUpdate, m_queryMaxScaleMode; InformationDisplay m_informationDisplay; @@ -167,6 +166,12 @@ public: bool NeedRedraw() const; void SetNeedRedraw(bool flag); + inline void XorQueryMaxScaleMode() + { + m_queryMaxScaleMode = !m_queryMaxScaleMode; + Invalidate(true); + } + virtual void BeginPaint(shared_ptr const & e); /// Function for calling from platform dependent-paint function. virtual void DoPaint(shared_ptr const & e); diff --git a/qt/draw_widget.cpp b/qt/draw_widget.cpp index 09b34da627..528a804f92 100644 --- a/qt/draw_widget.cpp +++ b/qt/draw_widget.cpp @@ -422,4 +422,9 @@ namespace qt m_framework->ShowRect(rect); UpdateScaleControl(); } + + void DrawWidget::QueryMaxScaleMode() + { + m_framework->XorQueryMaxScaleMode(); + } } diff --git a/qt/draw_widget.hpp b/qt/draw_widget.hpp index 9a10032399..4d0b96f20d 100644 --- a/qt/draw_widget.hpp +++ b/qt/draw_widget.hpp @@ -73,6 +73,8 @@ namespace qt void ScaleTimerElapsed(); void AnimTimerElapsed(); + void QueryMaxScaleMode(); + public: DrawWidget(QWidget * pParent); diff --git a/qt/mainwindow.cpp b/qt/mainwindow.cpp index b594948b69..8397aa095a 100644 --- a/qt/mainwindow.cpp +++ b/qt/mainwindow.cpp @@ -225,7 +225,8 @@ void MainWindow::CreateNavigationBar() { Qt::Key_Minus, SLOT(ScaleMinus()) }, { Qt::ALT + Qt::Key_Equal, SLOT(ScalePlusLight()) }, { Qt::ALT + Qt::Key_Minus, SLOT(ScaleMinusLight()) }, - { Qt::Key_A, SLOT(ShowAll()) } + { Qt::Key_A, SLOT(ShowAll()) }, + { Qt::Key_S, SLOT(QueryMaxScaleMode()) } }; for (size_t i = 0; i < ARRAY_SIZE(arr); ++i)