projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
05119ae
)
Fix the case of jump-to-next{prev}-Mark.
author
Ben Loftis
<ben@harrisonconsoles.com>
Mon, 19 Dec 2016 22:42:58 +0000
(16:42 -0600)
committer
Ben Loftis
<ben@harrisonconsoles.com>
Mon, 19 Dec 2016 23:25:59 +0000
(17:25 -0600)
gtk2_ardour/editor.cc
patch
|
blob
|
history
diff --git
a/gtk2_ardour/editor.cc
b/gtk2_ardour/editor.cc
index 7526c9677d22fa3d3b5c31f6fb2d52acdda71f4a..78f4e2b405c5230665c9a84d070348548bf12bf4 100644
(file)
--- 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) {
} 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;
start = after;
+ else if ((direction == RoundDownMaybe || direction == RoundDownAlways))
+ start = before;
+ else if (direction == 0 ) {
+ if ((start - before) < (after - start)) {
+ start = before;
+ } else {
+ start = after;
+ }
}
}
}
}