From dc61256466cb02daa4c6de0dbaebf4b9ed1325d6 Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Fri, 9 Feb 2018 09:59:39 -0600 Subject: new_grid: Rewrite of Snap and Grid. (squashed commit) Separate Snap from Grid. Lots of naming changes. Multiple simultaneous snap options allowed. Grid is one of the possible Snap options. Grid uses the same data as the rulers. Replace complicated tempo_lines with simple grid_lines. The Grid is zoom-scale-sensitive along with the rulers. If you are zoomed out, grid becomes coarser. --- gtk2_ardour/region_view.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gtk2_ardour/region_view.cc') diff --git a/gtk2_ardour/region_view.cc b/gtk2_ardour/region_view.cc index daca247297..c2a83a4cd9 100644 --- a/gtk2_ardour/region_view.cc +++ b/gtk2_ardour/region_view.cc @@ -948,12 +948,12 @@ RegionView::snap_sample_to_sample (sampleoffset_t x, bool ensure_snap) const /* try a snap in either direction */ MusicSample sample (session_sample, 0); - editor.snap_to (sample, RoundNearest, false, ensure_snap); + editor.snap_to (sample, RoundNearest, SnapToAny, false, ensure_snap); /* if we went off the beginning of the region, snap forwards */ if (sample.sample < _region->position ()) { sample.sample = session_sample; - editor.snap_to (sample, RoundUpAlways, false, ensure_snap); + editor.snap_to (sample, RoundUpAlways, SnapToAny, false, ensure_snap); } /* back to region relative, keeping the relevant divisor */ -- cgit v1.2.3