diff options
author | David Robillard <d@drobilla.net> | 2014-12-25 15:32:10 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-12-25 15:32:10 -0500 |
commit | 12a7f12b0bcee20b6041b7ece27a120b130271c2 (patch) | |
tree | f6aec813237d2d505662df96d85eee086449d6a4 /gtk2_ardour/region_selection.cc | |
parent | 6b1c171dc2029f89d3a2cfcc8553a8b10d38e538 (diff) |
Context menu for applying edits to note selection.
Diffstat (limited to 'gtk2_ardour/region_selection.cc')
-rw-r--r-- | gtk2_ardour/region_selection.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gtk2_ardour/region_selection.cc b/gtk2_ardour/region_selection.cc index 54e5aa3acc..1536dd61e4 100644 --- a/gtk2_ardour/region_selection.cc +++ b/gtk2_ardour/region_selection.cc @@ -21,6 +21,7 @@ #include "ardour/region.h" #include "gui_thread.h" +#include "midi_region_view.h" #include "region_view.h" #include "region_selection.h" #include "time_axis_view.h" @@ -287,3 +288,18 @@ RegionSelection::playlists () const return pl; } + +size_t +RegionSelection::n_midi_regions () const +{ + size_t count = 0; + + for (const_iterator r = begin(); r != end(); ++r) { + MidiRegionView* const mrv = dynamic_cast<MidiRegionView*> (*r); + if (mrv) { + ++count; + } + } + + return count; +} |