mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 00:34:59 +01:00
Use an enum for RoundMode instead of magic numbers.
No functional changes in this one (for easier auditing), but towards having round up/down only if necessary modes, rather than kludging around that situation with a double round as we do currently.
This commit is contained in:
parent
9c5e63bcc6
commit
fd9ccc7058
14 changed files with 60 additions and 35 deletions
|
|
@ -6463,7 +6463,7 @@ Editor::playhead_forward_to_grid ()
|
|||
framepos_t pos = playhead_cursor->current_frame ();
|
||||
if (pos < max_framepos - 1) {
|
||||
pos += 2;
|
||||
snap_to_internal (pos, 1, false);
|
||||
snap_to_internal (pos, RoundUpAlways, false);
|
||||
_session->request_locate (pos);
|
||||
}
|
||||
}
|
||||
|
|
@ -6479,7 +6479,7 @@ Editor::playhead_backward_to_grid ()
|
|||
framepos_t pos = playhead_cursor->current_frame ();
|
||||
if (pos > 2) {
|
||||
pos -= 2;
|
||||
snap_to_internal (pos, -1, false);
|
||||
snap_to_internal (pos, RoundDownAlways, false);
|
||||
_session->request_locate (pos);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue