From: Joel Holdsworth Date: Sat, 13 Dec 2014 10:37:43 +0000 (+0000) Subject: CursorHeader: Made drag position pixel perfect X-Git-Tag: pulseview-0.3.0~356 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=650e2e5fd465119615b9b969d15cc9fb11f18aa4;p=pulseview.git CursorHeader: Made drag position pixel perfect --- diff --git a/pv/view/cursorheader.cpp b/pv/view/cursorheader.cpp index f79a5785..c324410a 100644 --- a/pv/view/cursorheader.cpp +++ b/pv/view/cursorheader.cpp @@ -100,7 +100,8 @@ void CursorHeader::mouseMoveEvent(QMouseEvent *e) for (auto &i : items) if (i->dragging()) i->set_time(view_.offset() + - (i->drag_point().x() + delta) * view_.scale()); + (i->drag_point().x() + delta - 0.5) * + view_.scale()); } void CursorHeader::mousePressEvent(QMouseEvent *e)