summaryrefslogtreecommitdiff
path: root/gtk2_ardour/region_view.cc
diff options
context:
space:
mode:
authorBen Loftis <ben@harrisonconsoles.com>2018-07-26 14:23:59 -0500
committerRobin Gareus <robin@gareus.org>2018-07-27 00:28:47 +0200
commit0883f02de92478800ad232f10d388219e2817ed7 (patch)
tree28e65aba638709df055c1e44ccebf936060313ff /gtk2_ardour/region_view.cc
parent83ce11e4111682c0dfea6b3927a157b9d23556ea (diff)
new_grid: The Return of the snap_to_X functions.
We no longer assume that Snap always uses the visible ruler lines. If you want to snap to the grid, and ignore the users zoom scale, use SnapPref::SnapToGrid_Unscaled This fixes 2 (known) oversights: "snap region(s) to grid" and "regions whose start are left of the canvas edge".
Diffstat (limited to 'gtk2_ardour/region_view.cc')
-rw-r--r--gtk2_ardour/region_view.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk2_ardour/region_view.cc b/gtk2_ardour/region_view.cc
index c2a83a4cd9..36c70f15b0 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, SnapToAny, false, ensure_snap);
+ editor.snap_to (sample, RoundNearest, SnapToAny_Visual, 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, SnapToAny, false, ensure_snap);
+ editor.snap_to (sample, RoundUpAlways, SnapToAny_Visual, ensure_snap);
}
/* back to region relative, keeping the relevant divisor */