Fix jump to next/prev bar
Previously this only located to the prev/next bar if the playhead was not already on a bar boundary
This commit is contained in:
parent
517d82a6f2
commit
bf7d4f895e
@ -3045,22 +3045,7 @@ Editor::_snap_to_bbt (timepos_t const & presnap, Temporal::RoundMode direction,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if (grid_type == GridTypeBar) {
|
if (grid_type == GridTypeBar) {
|
||||||
TempoMetric m (tmap->metric_at (presnap));
|
return timepos_t (tmap->quarters_at (presnap).round_to_subdivision (get_grid_beat_divisions(_grid_type), direction));
|
||||||
BBT_Argument bbt (m.bbt_at (presnap));
|
|
||||||
switch (direction) {
|
|
||||||
case RoundDownAlways:
|
|
||||||
bbt = BBT_Argument (bbt.reference(), bbt.round_down_to_bar ());
|
|
||||||
break;
|
|
||||||
case RoundUpAlways:
|
|
||||||
bbt = BBT_Argument (bbt.reference(), bbt.round_up_to_bar ());
|
|
||||||
break;
|
|
||||||
case RoundNearest:
|
|
||||||
bbt = BBT_Argument (bbt.reference(), m.round_to_bar (bbt));
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return timepos_t (tmap->quarters_at (bbt));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gpref != SnapToGrid_Unscaled) { // use the visual grid lines which are limited by the zoom scale that the user selected
|
if (gpref != SnapToGrid_Unscaled) { // use the visual grid lines which are limited by the zoom scale that the user selected
|
||||||
|
Loading…
Reference in New Issue
Block a user