diff options
author | nick_m <mainsbridge@gmail.com> | 2017-02-05 05:02:01 +1100 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2017-02-05 05:02:01 +1100 |
commit | 5031bdcf10bf7dbc8521598f3a60a0285b9abe1b (patch) | |
tree | 7ac0a6c5bddb47925878abe9c5e3d518af3c61f4 /gtk2_ardour/region_view.cc | |
parent | fac04afbba35976dbf13a0e0c298b8af6f42a70f (diff) |
midi note drags are music-based.
- wysiwyg (during drag) when dragging more than one note across
a tempo change.
- introduces a muscal equivalent of snap_delta (only used for
note drags atm)
- split earliest note in selection into a separate function
- MRV::copy_selection() returns the equivalent _primary note
to avoid offset hell.
- RV::snap_frame_to_frame returns a MusicFrame
- prevent note drag moving before region start.
Diffstat (limited to 'gtk2_ardour/region_view.cc')
-rw-r--r-- | gtk2_ardour/region_view.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk2_ardour/region_view.cc b/gtk2_ardour/region_view.cc index 9f6ff645ce..c689a15e7d 100644 --- a/gtk2_ardour/region_view.cc +++ b/gtk2_ardour/region_view.cc @@ -943,7 +943,7 @@ RegionView::move_contents (frameoffset_t distance) * Used when inverting snap mode logic with key modifiers, or snap distance calculation. * @return Snapped frame offset from this region's position. */ -frameoffset_t +MusicFrame RegionView::snap_frame_to_frame (frameoffset_t x, bool ensure_snap) const { PublicEditor& editor = trackview.editor(); @@ -960,6 +960,6 @@ RegionView::snap_frame_to_frame (frameoffset_t x, bool ensure_snap) const editor.snap_to (frame, RoundUpAlways, false, ensure_snap); } - /* back to region relative */ - return frame.frame - _region->position(); + /* back to region relative, keeping the relevant divisor */ + return MusicFrame (frame.frame - _region->position(), frame.division); } |