[drape] Allow controlling viewport restoration on DeactivateMapSelection

Signed-off-by: hemanggs <hemangmanhas@gmail.com>
This commit is contained in:
hemanggs
2025-06-08 19:13:12 +05:30
committed by Konstantin Pastbin
parent fc199252eb
commit 90492e95e6
12 changed files with 32 additions and 23 deletions

View File

@@ -1332,7 +1332,7 @@ void FrontendRenderer::ProcessSelection(ref_ptr<SelectObjectMessage> msg)
if (msg->IsDismiss())
{
m_selectionShape->Hide();
if (!m_myPositionController->IsModeChangeViewport() && m_selectionTrackInfo)
if (msg->ShouldRestoreViewport() && !m_myPositionController->IsModeChangeViewport() && m_selectionTrackInfo)
{
AddUserEvent(make_unique_dp<SetAnyRectEvent>(m_selectionTrackInfo->m_startRect,
true /* isAnim */, false /* fitInViewport */,