mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 11:06:32 +01:00
Alter snap modifier so that it turns the grid on when it's off as well as vice-versa.
git-svn-id: svn://localhost/ardour2/branches/3.0@5584 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
29fea7b61d
commit
df71243d6c
6 changed files with 49 additions and 43 deletions
|
|
@ -1181,9 +1181,7 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
|
|||
|
||||
case MarkerBarItem:
|
||||
if (!_dragging_playhead) {
|
||||
if (!Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier())) {
|
||||
snap_to (where, 0, true);
|
||||
}
|
||||
snap_to_with_modifier (where, event, 0, true);
|
||||
mouse_add_new_marker (where);
|
||||
}
|
||||
return true;
|
||||
|
|
@ -1191,18 +1189,14 @@ 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
|
||||
if (!Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier())) {
|
||||
snap_to (where, 0, true);
|
||||
}
|
||||
snap_to_with_modifier (where, event, 0, true);
|
||||
mouse_add_new_marker (where, true);
|
||||
}
|
||||
return true;
|
||||
|
||||
case TempoBarItem:
|
||||
if (!_dragging_playhead) {
|
||||
if (!Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier())) {
|
||||
snap_to (where);
|
||||
}
|
||||
snap_to_with_modifier (where, event);
|
||||
mouse_add_new_tempo_event (where);
|
||||
}
|
||||
return true;
|
||||
|
|
@ -2222,9 +2216,7 @@ Editor::point_trim (GdkEvent* event)
|
|||
|
||||
nframes64_t new_bound = _drag->current_pointer_frame();
|
||||
|
||||
if (!Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier())) {
|
||||
snap_to (new_bound);
|
||||
}
|
||||
snap_to_with_modifier (new_bound, event);
|
||||
|
||||
/* Choose action dependant on which button was pressed */
|
||||
switch (event->button.button) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue