summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_mouse.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/editor_mouse.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/editor_mouse.cc')
-rw-r--r--gtk2_ardour/editor_mouse.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc
index 4b15b5d0e0..9bd882933b 100644
--- a/gtk2_ardour/editor_mouse.cc
+++ b/gtk2_ardour/editor_mouse.cc
@@ -317,10 +317,10 @@ Editor::mouse_mode_toggled (MouseMode m)
/* Switch snap type/mode if we're moving to/from an internal tool. Note
this must toggle the actions and not call set_snap_*() directly,
otherwise things get out of sync and the combo box stops working. */
- if (!UIConfiguration::instance().get_grid_follows_internal()) {
+ if (!UIConfiguration::instance().get_grid_follows_internal()) {
grid_type_action(pre_internal_grid_type)->set_active(true);
snap_mode_action(pre_internal_snap_mode)->set_active(true);
- } else if (!was_internal && internal_editing()) {
+ } else if (!was_internal && internal_editing()) {
grid_type_action(internal_grid_type)->set_active(true);
snap_mode_action(internal_snap_mode)->set_active(true);
} else if (was_internal && !internal_editing()) {
@@ -1599,7 +1599,7 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
case MarkerBarItem:
if (!_dragging_playhead) {
- snap_to_with_modifier (where, event, RoundNearest, SnapToAny, true);
+ snap_to_with_modifier (where, event, RoundNearest, SnapToGrid_Scaled);
mouse_add_new_marker (where.sample);
}
return true;
@@ -1607,7 +1607,7 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
case CdMarkerBarItem:
if (!_dragging_playhead) {
/* if we get here then a dragged range wasn't done */
- snap_to_with_modifier (where, event, RoundNearest, SnapToAny, true);
+ snap_to_with_modifier (where, event, RoundNearest, SnapToGrid_Scaled);
mouse_add_new_marker (where.sample, true);
}
return true;