code cleanup of Editor::remove_gaps() (removing functionality derived from copy-n-paste of insert-time)
This commit is contained in:
parent
bbcdd959bf
commit
2cf0e94d16
@ -9005,29 +9005,18 @@ Editor::remove_gaps (samplecnt_t gap_threshold, samplecnt_t leave_gap)
|
|||||||
{
|
{
|
||||||
bool in_command = false;
|
bool in_command = false;
|
||||||
TrackViewList ts = selection->tracks.filter_to_unique_playlists ();
|
TrackViewList ts = selection->tracks.filter_to_unique_playlists ();
|
||||||
bool all_playlists = false;
|
|
||||||
|
|
||||||
for (TrackSelection::iterator x = ts.begin(); x != ts.end(); ++x) {
|
for (TrackSelection::iterator x = ts.begin(); x != ts.end(); ++x) {
|
||||||
|
|
||||||
/* don't operate on any playlist more than once, which could
|
/* don't operate on any playlist more than once, which could
|
||||||
* happen if "all playlists" is enabled, but there is more
|
* happen if there is more than 1 track using the same
|
||||||
* than 1 track using playlists "from" a given track.
|
* playlist.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
set<boost::shared_ptr<Playlist> > pl;
|
set<boost::shared_ptr<Playlist> > pl;
|
||||||
|
|
||||||
if (all_playlists) {
|
if ((*x)->playlist ()) {
|
||||||
RouteTimeAxisView* rtav = dynamic_cast<RouteTimeAxisView*> (*x);
|
pl.insert ((*x)->playlist ());
|
||||||
if (rtav && rtav->track ()) {
|
|
||||||
vector<boost::shared_ptr<Playlist> > all = _session->playlists()->playlists_for_track (rtav->track ());
|
|
||||||
for (vector<boost::shared_ptr<Playlist> >::iterator p = all.begin(); p != all.end(); ++p) {
|
|
||||||
pl.insert (*p);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if ((*x)->playlist ()) {
|
|
||||||
pl.insert ((*x)->playlist ());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (set<boost::shared_ptr<Playlist> >::iterator i = pl.begin(); i != pl.end(); ++i) {
|
for (set<boost::shared_ptr<Playlist> >::iterator i = pl.begin(); i != pl.end(); ++i) {
|
||||||
|
Loading…
Reference in New Issue
Block a user