mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 16:46:35 +01:00
select all, musical (fuzzy) loop/punch/range region selections, soundtouch patch for gcc 4.1, needs 's' key to not clear selection.
git-svn-id: svn://localhost/trunk/ardour2@289 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
51093cc589
commit
dfcd837d67
8 changed files with 165 additions and 7 deletions
|
|
@ -1306,10 +1306,47 @@ Editor::set_selection_from_loop()
|
|||
if ((location = session->locations()->auto_loop_location()) == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
set_selection_from_range (*location);
|
||||
}
|
||||
|
||||
void
|
||||
Editor::select_all_from_punch()
|
||||
{
|
||||
Location* location;
|
||||
list<Selectable *> touched;
|
||||
if ((location = session->locations()->auto_punch_location()) == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (TrackViewList::iterator iter = track_views.begin(); iter != track_views.end(); ++iter) {
|
||||
if ((*iter)->hidden()) {
|
||||
continue;
|
||||
}
|
||||
(*iter)->get_selectables (location->start(), location->end(), 0, DBL_MAX, touched);
|
||||
}
|
||||
selection->set (touched);
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
Editor::select_all_from_loop()
|
||||
{
|
||||
Location* location;
|
||||
list<Selectable *> touched;
|
||||
|
||||
if ((location = session->locations()->auto_loop_location()) == 0) {
|
||||
return;
|
||||
}
|
||||
for (TrackViewList::iterator iter = track_views.begin(); iter != track_views.end(); ++iter) {
|
||||
if ((*iter)->hidden()) {
|
||||
continue;
|
||||
}
|
||||
(*iter)->get_selectables (location->start(), location->end(), 0, DBL_MAX, touched);
|
||||
}
|
||||
selection->set (touched);
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
Editor::set_selection_from_range (Location& range)
|
||||
{
|
||||
|
|
@ -1322,6 +1359,29 @@ Editor::set_selection_from_range (Location& range)
|
|||
commit_reversible_command ();
|
||||
}
|
||||
|
||||
void
|
||||
Editor::select_all_after_cursor (Cursor *cursor, bool after)
|
||||
{
|
||||
jack_nframes_t start;
|
||||
jack_nframes_t end;
|
||||
list<Selectable *> touched;
|
||||
|
||||
if (after) {
|
||||
start = cursor->current_frame ;
|
||||
end = session->current_end_frame();
|
||||
} else {
|
||||
start = 0;
|
||||
end = cursor->current_frame ;
|
||||
}
|
||||
for (TrackViewList::iterator iter = track_views.begin(); iter != track_views.end(); ++iter) {
|
||||
if ((*iter)->hidden()) {
|
||||
continue;
|
||||
}
|
||||
(*iter)->get_selectables (start, end, 0, DBL_MAX, touched);
|
||||
}
|
||||
selection->set (touched);
|
||||
}
|
||||
|
||||
void
|
||||
Editor::amplitude_zoom_step (bool in)
|
||||
{
|
||||
|
|
@ -2654,7 +2714,6 @@ Editor::set_region_sync_from_edit_cursor ()
|
|||
}
|
||||
|
||||
Region& region (clicked_regionview->region);
|
||||
|
||||
begin_reversible_command (_("set sync from edit cursor"));
|
||||
session->add_undo (region.playlist()->get_memento());
|
||||
region.set_sync_position (edit_cursor->current_frame);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue