From a83ecf8226603f9bdc6f1f0371b9723a24b54c96 Mon Sep 17 00:00:00 2001 From: rachytski Date: Thu, 1 Sep 2011 18:03:39 +0300 Subject: [PATCH] Restored correct location position when scaling. --- map/location_state.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/map/location_state.cpp b/map/location_state.cpp index 68e4b395fe..387daad197 100644 --- a/map/location_state.cpp +++ b/map/location_state.cpp @@ -69,9 +69,11 @@ namespace location { double pxErrorRadius; m2::PointD pxPosition; + m2::PointD pxShift(screen.PixelRect().minX(), screen.PixelRect().minY()); + if ((m_flags & State::EGps) || (m_flags & State::ECompass)) { - pxPosition = screen.GtoP(Position()); + pxPosition = screen.GtoP(Position()) - pxShift; pxErrorRadius = pxPosition.Length(screen.GtoP(Position() + m2::PointD(ErrorRadius(), 0)));