From a9d85463ab6b5c16e69f465d33c16cd10ae59faf Mon Sep 17 00:00:00 2001 From: Konstantin Pastbin Date: Mon, 3 Feb 2025 13:24:06 +0700 Subject: [PATCH] [drape] Fix disappearing building POIs when in perspective Signed-off-by: Konstantin Pastbin --- drape/overlay_handle.cpp | 4 ++-- drape_frontend/text_handle.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drape/overlay_handle.cpp b/drape/overlay_handle.cpp index 841787d51c..e1e1c258e7 100644 --- a/drape/overlay_handle.cpp +++ b/drape/overlay_handle.cpp @@ -67,7 +67,7 @@ m2::PointD OverlayHandle::GetPivot(ScreenBase const & screen, bool perspective) result.y += size.y; if (perspective) - result = screen.PtoP3d(result, -m_pivotZ / screen.GetScale()); + result = screen.PtoP3d(result, -m_pivotZ); return result; } @@ -163,7 +163,7 @@ m2::RectD OverlayHandle::GetPixelRectPerspective(ScreenBase const & screen) cons if (m_isBillboard) { m2::PointD const pxPivot = GetPivot(screen, false); - m2::PointD const pxPivotPerspective = screen.PtoP3d(pxPivot, -m_pivotZ / screen.GetScale()); + m2::PointD const pxPivotPerspective = screen.PtoP3d(pxPivot, -m_pivotZ); m2::RectD pxRectPerspective = GetPixelRect(screen, false); pxRectPerspective.Offset(-pxPivot); diff --git a/drape_frontend/text_handle.cpp b/drape_frontend/text_handle.cpp index 9c62465c2a..f538552a35 100644 --- a/drape_frontend/text_handle.cpp +++ b/drape_frontend/text_handle.cpp @@ -75,7 +75,7 @@ std::string TextHandle::GetOverlayDebugInfo() { std::ostringstream out; out << "Text Priority(" << std::hex << std::setw(16) << std::setfill('0') << GetPriority() - << ") " << std::dec << DebugPrint(GetOverlayID()) << " " << strings::ToUtf8(m_text); + << ") " << std::dec << DebugPrint(GetOverlayID()); return out.str(); } #endif