diff options
author | Ben Loftis <ben@harrisonconsoles.com> | 2016-12-19 16:42:58 -0600 |
---|---|---|
committer | Ben Loftis <ben@harrisonconsoles.com> | 2016-12-19 17:25:59 -0600 |
commit | 6ebf14c2c2e37e652837e6f387133e866d9d1b39 (patch) | |
tree | a86212f075de00fb34bd0734f52aa8615a787fed /gtk2_ardour/editor.cc | |
parent | 05119ae3ee45ddb90f2966ca3ac9c511fc84c947 (diff) |
Fix the case of jump-to-next{prev}-Mark.
Diffstat (limited to 'gtk2_ardour/editor.cc')
-rw-r--r-- | gtk2_ardour/editor.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 7526c9677d..78f4e2b405 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -2920,11 +2920,16 @@ Editor::snap_to_internal (framepos_t& start, RoundMode direction, bool for_mark, } else if (after == max_framepos) { start = before; } else if (before != max_framepos && after != max_framepos) { - /* have before and after */ - if ((start - before) < (after - start)) { - start = before; - } else { + if ((direction == RoundUpMaybe || direction == RoundUpAlways)) start = after; + else if ((direction == RoundDownMaybe || direction == RoundDownAlways)) + start = before; + else if (direction == 0 ) { + if ((start - before) < (after - start)) { + start = before; + } else { + start = after; + } } } |