From 163d54fb24bd6853c0ed36af4d8ce40bfc22e2ce Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Tue, 23 Jan 2024 14:41:25 +0100 Subject: [PATCH] Comparison View: Fix wrong horizontal location when dragging starts Use localPos instead of windowPos --- ApplicationLibCode/UserInterface/RiuComparisonViewMover.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ApplicationLibCode/UserInterface/RiuComparisonViewMover.cpp b/ApplicationLibCode/UserInterface/RiuComparisonViewMover.cpp index ea0419ff9a..dd0d385e9a 100644 --- a/ApplicationLibCode/UserInterface/RiuComparisonViewMover.cpp +++ b/ApplicationLibCode/UserInterface/RiuComparisonViewMover.cpp @@ -61,7 +61,7 @@ bool RiuComparisonViewMover::eventFilter( QObject* watched, QEvent* event ) if ( m_dragState == LEFT_EDGE ) { - QPointF mousePos = mEv->windowPos(); + QPointF mousePos = mEv->localPos(); QPointF normMousePos = { mousePos.x() / m_viewer->width(), mousePos.y() / m_viewer->height() }; cvf::Rectf orgCompViewWindow = m_viewer->comparisonViewVisibleNormalizedRect();