+void
+Editor::get_regionviews_by_id (PBD::ID const & id, RegionSelection & regions) const
+{
+ for (TrackViewList::const_iterator i = track_views.begin(); i != track_views.end(); ++i) {
+ RouteTimeAxisView* tatv;
+
+ if ((tatv = dynamic_cast<RouteTimeAxisView*> (*i)) != 0) {
+ boost::shared_ptr<Playlist> pl;
+ std::vector<boost::shared_ptr<Region> > results;
+ boost::shared_ptr<Track> tr;
+
+ if ((tr = tatv->track()) == 0) {
+ /* bus */
+ continue;
+ }
+
+ if ((pl = (tr->playlist())) != 0) {
+ boost::shared_ptr<Region> r = pl->region_by_id (id);
+ if (r) {
+ RegionView* marv = tatv->view()->find_view (r);
+ if (marv) {
+ regions.push_back (marv);
+ }
+ }
+ }
+ }
+ }
+}
+