diff options
-rwxr-xr-x | drape_frontend/frontend_renderer.cpp | 1 | ||||
-rw-r--r-- | drape_frontend/user_event_stream.cpp | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/drape_frontend/frontend_renderer.cpp b/drape_frontend/frontend_renderer.cpp index e9bf267a5e..bb14a24a5c 100755 --- a/drape_frontend/frontend_renderer.cpp +++ b/drape_frontend/frontend_renderer.cpp @@ -1485,7 +1485,6 @@ 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; } diff --git a/drape_frontend/user_event_stream.cpp b/drape_frontend/user_event_stream.cpp index 0d3ed4c5b5..1f10bebd42 100644 --- a/drape_frontend/user_event_stream.cpp +++ b/drape_frontend/user_event_stream.cpp @@ -180,7 +180,7 @@ ScreenBase const & UserEventStream::ProcessEvents(bool & modelViewChanged, bool { ref_ptr<ResizeEvent> resizeEvent = make_ref(e); m_navigator.OnSize(resizeEvent->GetWidth(), resizeEvent->GetHeight()); - if (m_visibleViewport.IsEmptyInterior()) + if (!m_visibleViewport.IsValid()) m_visibleViewport = m2::RectD(0, 0, resizeEvent->GetWidth(), resizeEvent->GetHeight()); viewportChanged = true; breakAnim = true; @@ -241,7 +241,7 @@ ScreenBase const & UserEventStream::ProcessEvents(bool & modelViewChanged, bool case UserEvent::EventType::VisibleViewport: { ref_ptr<SetVisibleViewportEvent> viewportEvent = make_ref(e); - m2::RectD prevVisibleViewport = m_visibleViewport; + m2::RectD const prevVisibleViewport = m_visibleViewport; m_visibleViewport = viewportEvent->GetRect(); m2::PointD gOffset; if (m_listener->OnNewVisibleViewport(prevVisibleViewport, m_visibleViewport, gOffset)) |