diff options
-rwxr-xr-x | drape_frontend/frontend_renderer.cpp | 4 | ||||
-rw-r--r-- | qt/draw_widget.cpp | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/drape_frontend/frontend_renderer.cpp b/drape_frontend/frontend_renderer.cpp index 5c94bf82a3..b4f128485c 100755 --- a/drape_frontend/frontend_renderer.cpp +++ b/drape_frontend/frontend_renderer.cpp @@ -1455,7 +1455,7 @@ void FrontendRenderer::OnTouchMapAction() bool FrontendRenderer::OnNewVisibleViewport(m2::RectD const & oldViewport, m2::RectD const & newViewport, m2::PointD & gOffset) { gOffset = m2::PointD(0, 0); - if (m_myPositionController->IsModeChangeViewport() || m_selectionShape == nullptr) + if (m_myPositionController->IsModeChangeViewport() || m_selectionShape == nullptr || oldViewport == newViewport) return false; ScreenBase const & screen = m_userEventStream.GetCurrentScreen(); @@ -1487,8 +1487,8 @@ bool FrontendRenderer::OnNewVisibleViewport(m2::RectD const & oldViewport, m2::R pOffset.y = newViewport.maxY() - rect.maxY() - kOffset; gOffset = screen.PtoG(screen.P3dtoP(pos + pOffset)) - screen.PtoG(screen.P3dtoP(pos)); + return true; } - return true; } return false; } diff --git a/qt/draw_widget.cpp b/qt/draw_widget.cpp index 4c3b9717ed..91307fb90c 100644 --- a/qt/draw_widget.cpp +++ b/qt/draw_widget.cpp @@ -364,6 +364,7 @@ void DrawWidget::resizeGL(int width, int height) float w = m_ratio * width; float h = m_ratio * height; m_framework->OnSize(w, h); + m_framework->SetVisibleViewport(m2::RectD(0, 0, w, h)); if (m_skin) { m_skin->Resize(w, h); |