diff options
author | nick_m <mainsbridge@gmail.com> | 2015-05-17 23:47:01 +1000 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2015-05-17 23:47:01 +1000 |
commit | c359f881a1fbcbcbeeed3fadfe3b9df19418998a (patch) | |
tree | 9bd57690e531dda52e68190e5bef8b75a1259c55 /gtk2_ardour/midi_region_view.cc | |
parent | 91a34c596d1bb72f33ccaa17d6ebfa3a435f629c (diff) |
Relative Snap -make it activated by the tertiary modifier during drag.
Disabled/enabled with the shift key. no config stuff at all now.
Move existing (strange) trim feature to primary + tertiary modifiers.
Diffstat (limited to 'gtk2_ardour/midi_region_view.cc')
-rw-r--r-- | gtk2_ardour/midi_region_view.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index 3ecadc4775..be280001d2 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -2896,8 +2896,7 @@ MidiRegionView::commit_resizing (NoteBase* primary, bool at_front, double delta_ /* Convert that to a frame within the source */ framepos_t current_fr = snap_pixel_to_sample (current_x) + _region->start (); - double one_frame = region_frames_to_region_beats_double (current_fr) - region_frames_to_region_beats_double (current_fr - 1); - cerr << "commit one frame in beats : " << one_frame << endl; + /* and then to beats */ const Evoral::Beats x_beats = region_frames_to_region_beats (current_fr); if (at_front && x_beats < canvas_note->note()->end_time()) { @@ -2913,7 +2912,7 @@ MidiRegionView::commit_resizing (NoteBase* primary, bool at_front, double delta_ if (!at_front) { const Evoral::Beats len = std::max(Evoral::Beats(1 / 512.0), - x_beats - canvas_note->note()->time() - (sign * delta_beats) - one_frame); + x_beats - canvas_note->note()->time() - (sign * delta_beats)); note_diff_add_change (canvas_note, MidiModel::NoteDiffCommand::Length, len); } |