diff options
author | Robin Gareus <robin@gareus.org> | 2017-02-23 22:31:03 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-02-23 22:32:32 +0100 |
commit | 1e4e97019da3e90f89614da51ac537ed2041bb55 (patch) | |
tree | 0f8177b0fa20002f475a614e0d907634dbd71338 /gtk2_ardour/editor.cc | |
parent | 71fd94b422574d1efbcce1ab85c6ce3da22ba450 (diff) |
Lua bindings to access editor selection + region selection bindings
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 () { |