summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_mouse.cc
diff options
context:
space:
mode:
authorBen Loftis <ben@harrisonconsoles.com>2018-02-09 08:21:45 -0600
committerBen Loftis <ben@harrisonconsoles.com>2018-02-09 08:21:45 -0600
commitc6eab71435686a0ff4a244584b0a9b24282b73fc (patch)
treedf5dc165232090651c9865b31b242a4de9279554 /gtk2_ardour/editor_mouse.cc
parent70d8300cb285256784f543da6aaf076d76b5052b (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/editor_mouse.cc')
-rw-r--r--gtk2_ardour/editor_mouse.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc
index 2509889853..bb8b2accae 100644
--- a/gtk2_ardour/editor_mouse.cc
+++ b/gtk2_ardour/editor_mouse.cc
@@ -2078,6 +2078,15 @@ Editor::motion_handler (ArdourCanvas::Item* /*item*/, GdkEvent* event, bool from
update_join_object_range_location (event->motion.y);
+ //snapped_cursor stuff ( the snapped_cursor shows where an operation is going to occur )
+ bool ignored;
+ MusicSample where (0, 0);
+ if (mouse_sample (where.sample, ignored)) {
+ snap_to_with_modifier (where, event);
+ set_snapped_cursor_position (where.sample);
+ }
+
+ //drags might also change the snapped_cursor location, because we are snapping the thing being dragged, not the actual mouse cursor
if (_drags->active ()) {
return _drags->motion_handler (event, from_autoscroll);
}