mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
Implement range selecting for MIDI notes (#4087).
git-svn-id: svn://localhost/ardour2/branches/3.0@10199 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
1567d362ad
commit
8be2e11c65
3 changed files with 50 additions and 4 deletions
|
|
@ -2027,6 +2027,19 @@ MidiRegionView::select_all_notes ()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
MidiRegionView::select_range (framepos_t start, framepos_t end)
|
||||
{
|
||||
clear_selection ();
|
||||
|
||||
for (Events::iterator i = _events.begin(); i != _events.end(); ++i) {
|
||||
framepos_t t = source_beats_to_absolute_frames((*i)->note()->time());
|
||||
if (t >= start && t <= end) {
|
||||
add_to_selection (*i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MidiRegionView::invert_selection ()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue