diff --git a/src/widget/woverview.cpp b/src/widget/woverview.cpp index dd44cb74159..8fa6aaca7eb 100644 --- a/src/widget/woverview.cpp +++ b/src/widget/woverview.cpp @@ -488,17 +488,9 @@ void WOverview::receiveCuesUpdated() { void WOverview::mouseMoveEvent(QMouseEvent* e) { if (m_bLeftClickDragging) { if (m_orientation == Qt::Horizontal) { -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) - m_iPickupPos = math_clamp(static_cast(e->position().x()), 0, width() - 1); -#else - m_iPickupPos = math_clamp(e->x(), 0, width() - 1); -#endif + m_iPickupPos = math_clamp(e->pos().x(), 0, width() - 1); } else { -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) - m_iPickupPos = math_clamp(static_cast(e->position().y()), 0, height() - 1); -#else - m_iPickupPos = math_clamp(e->y(), 0, height() - 1); -#endif + m_iPickupPos = math_clamp(e->pos().y(), 0, height() - 1); } } @@ -555,17 +547,9 @@ void WOverview::mousePressEvent(QMouseEvent* e) { } if (e->button() == Qt::LeftButton) { if (m_orientation == Qt::Horizontal) { -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) - m_iPickupPos = math_clamp(static_cast(e->position().x()), 0, width() - 1); -#else - m_iPickupPos = math_clamp(e->x(), 0, width() - 1); -#endif + m_iPickupPos = math_clamp(e->pos().x(), 0, width() - 1); } else { -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) - m_iPickupPos = math_clamp(static_cast(e->position().y()), 0, height() - 1); -#else - m_iPickupPos = math_clamp(e->y(), 0, height() - 1); -#endif + m_iPickupPos = math_clamp(e->pos().y(), 0, height() - 1); } if (m_pHoveredMark != nullptr) { diff --git a/src/widget/woverview.h b/src/widget/woverview.h index 242802d057f..7ef07607bc5 100644 --- a/src/widget/woverview.h +++ b/src/widget/woverview.h @@ -211,10 +211,10 @@ class WOverview : public WWidget, public TrackDropTarget { QColor m_lowColor; int m_dimBrightThreshold; parented_ptr m_pPassthroughLabel; + QCursor m_dragAbortCursor; WaveformMarkSet m_marks; std::vector m_markRanges; WaveformMarkLabel m_cuePositionLabel; WaveformMarkLabel m_cueTimeDistanceLabel; - };