X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fregion_selection.cc;h=127a0ffe8e055f9356cddb6a72cfb634b263c677;hb=d7deaa21bb78222e25b820c9583942a47dbc8fac;hp=333e2104ad8f49244affffc5883c939f162ad763;hpb=ed626628b54e67dd9621c08d82a42afaed00c7ac;p=ardour.git diff --git a/gtk2_ardour/region_selection.cc b/gtk2_ardour/region_selection.cc index 333e2104ad..127a0ffe8e 100644 --- a/gtk2_ardour/region_selection.cc +++ b/gtk2_ardour/region_selection.cc @@ -269,8 +269,20 @@ RegionSelection::end_frame () const { framepos_t e = 0; for (RegionSelection::const_iterator i = begin(); i != end(); ++i) { - e = max (e, (*i)->region()->position () + (*i)->region()->length ()); + e = max (e, (*i)->region()->last_frame ()); } return e; } + +/** @return the playlists that the regions in the selection are on */ +set > +RegionSelection::playlists () const +{ + set > pl; + for (RegionSelection::const_iterator i = begin(); i != end(); ++i) { + pl.insert ((*i)->region()->playlist ()); + } + + return pl; +}