mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-05 05:05:43 +01:00
Fix the case of jump-to-next{prev}-Mark.
This commit is contained in:
parent
05119ae3ee
commit
6ebf14c2c2
1 changed files with 9 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue