From 7bca6cdea744cf44b8e7ef3a5fc0e1306c97fc1f Mon Sep 17 00:00:00 2001 From: Alex Shvartzkop Date: Sun, 9 Jun 2024 18:46:36 +0300 Subject: [PATCH] Make crosshair follow view movement when using pan/zoom gestures. --- common/view/wx_view_controls.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index 593a0b5748..e7a0ebb0f5 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -640,7 +640,7 @@ void WX_VIEW_CONTROLS::onZoomGesture( wxZoomGestureEvent& aEvent ) m_gestureLastZoomFactor = aEvent.GetZoomFactor(); m_gestureLastPos = evtPos; - m_parentPanel->Refresh(); + refreshMouse( true ); } @@ -650,7 +650,8 @@ void WX_VIEW_CONTROLS::onPanGesture( wxPanGestureEvent& aEvent ) VECTOR2D deltaWorld = m_view->ToWorld( screenDelta, false ); m_view->SetCenter( m_view->GetCenter() - deltaWorld ); - m_parentPanel->Refresh(); + + refreshMouse( true ); }