diff options
author | nick_m <mainsbridge@gmail.com> | 2015-06-11 01:36:34 +1000 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2015-06-11 01:36:34 +1000 |
commit | b3a4c88e0effab2f7ccdacbe30f571e29f94a09a (patch) | |
tree | 550ef8099ef597166a5be656d3f86d8371444e91 /gtk2_ardour/midi_region_view.cc | |
parent | 9563e75cca3b7a54f66dd7a7eeed2a5dad415af4 (diff) |
Make absolute snap the default snap.
- also fixes a couple of absolute snap bugs wrt midi notes.
Diffstat (limited to 'gtk2_ardour/midi_region_view.cc')
-rw-r--r-- | gtk2_ardour/midi_region_view.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index 742d7d9793..fd869af0e7 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -2893,7 +2893,12 @@ MidiRegionView::commit_resizing (NoteBase* primary, bool at_front, double delta_ } /* Convert the new x position to a frame within the source */ - const framepos_t current_fr = snap_pixel_to_sample (current_x, with_snap) + _region->start (); + framepos_t current_fr; + if (with_snap) { + current_fr = snap_pixel_to_sample (current_x, with_snap) + _region->start (); + } else { + current_fr = trackview.editor().pixel_to_sample (current_x) + _region->start (); + } /* and then to beats */ const Evoral::Beats x_beats = region_frames_to_region_beats (current_fr); |