diff options
Diffstat (limited to 'gtk2_ardour/editor.cc')
-rw-r--r-- | gtk2_ardour/editor.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index bb769e30ef..ba07222bdf 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -5087,6 +5087,24 @@ Editor::get_regions_corresponding_to (boost::shared_ptr<Region> region, vector<R } } +RegionView* +Editor::get_regionview_from_region (boost::shared_ptr<Region> region) const +{ + for (TrackViewList::const_iterator i = track_views.begin(); i != track_views.end(); ++i) { + RouteTimeAxisView* tatv; + if ((tatv = dynamic_cast<RouteTimeAxisView*> (*i)) != 0) { + if (!tatv->track()) { + continue; + } + RegionView* marv = tatv->view()->find_view (region); + if (marv) { + return marv; + } + } + } + return NULL; +} + void Editor::show_rhythm_ferret () { |