Bug 1291

Summary: Cursor and vertical marker line snapping should have a way to snap by sample points (not just edges)
Product: PulseView Reporter: Uwe Hermann <uwe>
Component: Data displayAssignee: Nobody <nobody>
Status: CONFIRMED ---    
Severity: normal    
Priority: Normal    
Version: unreleased development snapshot   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Uwe Hermann 2018-09-29 14:10:29 CEST
As mentioned by joefitz in #684#c1 it would be great if there was a way to also hhave cursors (and the vertical marker from #770) snap to sample points (not just signal edges).

"In addition to snap-to-edge, snap-to-sample would be a nice to have. Psuedocode might be:

When dragging timing marker:
If CTRL (or other) key is pressed
-- place cursor in absolute position
ELSE
-- If mouse over a dataline
---- If nearest edge on moused-over dataline is < (5% * Display width)
------ Then snap to nearest edge of datalin
------ Else snap to nearest sample edge"

One method to do sample-snapping could be that it's only done if you enable "show sample points" (e.g. by pressing "." or via the menu). If that's not enabled, there'll be no snapping to samples (?) But maybe there's useful cases to snap to samples even when the dots are not being shown (?) Not sure.

Additionally, with the snapping the #1290 "show number of samples between cursors" becomes more convenient.