Fix #1292/1294 by snapping to any edge when not hovering over a signal
[pulseview.git] / pv / views / trace / timemarker.cpp
index 65b9481d12ff8261d321143d01b2add95c38ae5a..266007a57053c220f59a87fe80eb630438a413c0 100644 (file)
@@ -80,7 +80,9 @@ float TimeMarker::get_x() const
 
 QPoint TimeMarker::drag_point(const QRect &rect) const
 {
 
 QPoint TimeMarker::drag_point(const QRect &rect) const
 {
-       return QPoint(get_x(), rect.bottom());
+       (void)rect;
+
+       return QPoint(get_x(), view_.mapFromGlobal(QCursor::pos()).y());
 }
 
 QRectF TimeMarker::label_rect(const QRectF &rect) const
 }
 
 QRectF TimeMarker::label_rect(const QRectF &rect) const