refactor methods to add a location/section marker so that there is only one method for this

This commit is contained in:
Paul Davis 2024-05-21 08:21:02 -06:00
parent 8ad53bc96c
commit 2d5884ccb1
8 changed files with 34 additions and 64 deletions

View file

@ -1793,14 +1793,14 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
case MarkerBarItem:
if (!_dragging_playhead) {
snap_to_with_modifier (where, event, Temporal::RoundNearest, SnapToGrid_Scaled);
mouse_add_new_marker (where);
add_location_mark (where);
}
return true;
case SectionMarkerBarItem:
if (!_dragging_playhead && Keyboard::modifier_state_equals (event->button.state, Keyboard::PrimaryModifier)) {
snap_to_with_modifier (where, event, Temporal::RoundNearest, SnapToGrid_Scaled);
mouse_add_new_marker (where, Location::IsSection);
add_location_mark (where, Location::IsSection);
}
return true;