From ed676117750c625d1a0d320185d5899d10186833 Mon Sep 17 00:00:00 2001 From: Matthieu Hodgkinson Date: Fri, 15 May 2026 14:21:26 +0200 Subject: [PATCH] fix: reset hovered state on ESC --- .../uicomponents/qml/Muse/UiComponents/polylineplot.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/framework/uicomponents/qml/Muse/UiComponents/polylineplot.cpp b/framework/uicomponents/qml/Muse/UiComponents/polylineplot.cpp index 5fb6364f3c..a6e745c2f7 100644 --- a/framework/uicomponents/qml/Muse/UiComponents/polylineplot.cpp +++ b/framework/uicomponents/qml/Muse/UiComponents/polylineplot.cpp @@ -150,6 +150,10 @@ void PolylinePlot::init() dispatcher()->reg(this, "action://cancel", [this](){ // emit signal and let decide model what to do emit dragCancelled(); + // Qt suppresses hover events while a mouse button is held, so the + // ghost-point preview would otherwise stay painted at the press + // position until the user releases and moves the mouse. + m_hoveredOnLine = false; resetGestureState(); }); } @@ -1074,6 +1078,7 @@ void PolylinePlot::resetGestureState() m_pressedOnPoint = false; m_pressedPointIndex = INVALID_POINT_IDX; m_hasDraggedPointDomain = false; + m_hoveredOnLine = false; m_draggedPointDomain = {}; m_movedSincePress = false; m_pressPx = QPointF(0.0, 0.0);