]> sigrok.org Git - pulseview.git/commitdiff
CursorHeader: Made drag position pixel perfect
authorJoel Holdsworth <redacted>
Sat, 13 Dec 2014 10:37:43 +0000 (10:37 +0000)
committerJoel Holdsworth <redacted>
Sat, 20 Dec 2014 10:57:09 +0000 (10:57 +0000)
pv/view/cursorheader.cpp

index f79a5785d558f56b54a60b37605614d08f9b16c9..c324410a75cb873aaed571cea402f23981ad36ec 100644 (file)
@@ -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)