diff options
author | Ben Loftis <ben@harrisonconsoles.com> | 2018-02-09 08:21:45 -0600 |
---|---|---|
committer | Ben Loftis <ben@harrisonconsoles.com> | 2018-02-09 08:21:45 -0600 |
commit | c6eab71435686a0ff4a244584b0a9b24282b73fc (patch) | |
tree | df5dc165232090651c9865b31b242a4de9279554 /gtk2_ardour/midi_region_view.cc | |
parent | 70d8300cb285256784f543da6aaf076d76b5052b (diff) |
new_snap: Snapped Cursor ( squashed commit )
Snapped Cursor is a line that follows the edit point, and indicates where the operation will occur.
This replaces and extends the line that appears with the Cut tool.
New associated preferences: snap_threshold and show_snap_cursor.
Diffstat (limited to 'gtk2_ardour/midi_region_view.cc')
-rw-r--r-- | gtk2_ardour/midi_region_view.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index 4a19a6697a..53b42b27f2 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -347,6 +347,9 @@ MidiRegionView::canvas_group_event(GdkEvent* ev) return RegionView::canvas_group_event (ev); } + //For now, move the snapped cursor aside so it doesn't bother you during internal editing + //trackview.editor().set_snapped_cursor_position(_region->position()); + bool r; switch (ev->type) { @@ -3035,6 +3038,7 @@ MidiRegionView::update_resizing (NoteBase* primary, bool at_front, double delta_ } else { snapped_x = trackview.editor ().pixel_to_sample (current_x); } + const Temporal::Beats beats = Temporal::Beats (tmap.exact_beat_at_sample (snapped_x + midi_region()->position(), divisions) - midi_region()->beat()) + midi_region()->start_beats(); @@ -3058,6 +3062,8 @@ MidiRegionView::update_resizing (NoteBase* primary, bool at_front, double delta_ show_verbose_cursor (buf, 0, 0); cursor_set = true; + + trackview.editor().set_snapped_cursor_position ( snapped_x + midi_region()->position() ); } } |