diff options
author | Robin Gareus <robin@gareus.org> | 2012-11-18 15:35:05 +0000 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2012-11-18 15:35:05 +0000 |
commit | 7b57d47e2592641181d0e87b51ee93e89b4068f2 (patch) | |
tree | 35f9df9c551783b954f40e7f871908364e36e5bb /gtk2_ardour/editor_drag.cc | |
parent | 5932b7903a7c43cc3b5cfd043e64d577e0125799 (diff) |
grid/snap minimum selection length
git-svn-id: svn://localhost/ardour2/branches/3.0@13527 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_drag.cc')
-rw-r--r-- | gtk2_ardour/editor_drag.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index 0a71055fcb..d06191d368 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -3456,10 +3456,15 @@ SelectionDrag::motion (GdkEvent* event, bool first_move) framepos_t grab = grab_frame (); if (first_move) { - _editor->snap_to (grab); + grab = adjusted_current_frame (event, false); + if (grab < pending_position) { + _editor->snap_to (grab, -1); + } else { + _editor->snap_to (grab, 1); + } } - if (pending_position < grab_frame()) { + if (pending_position < grab) { start = pending_position; end = grab; } else { |