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;
|
||||
TrackViewList ts = selection->tracks.filter_to_unique_playlists ();
|
||||
bool all_playlists = false;
|
||||
|
||||
for (TrackSelection::iterator x = ts.begin(); x != ts.end(); ++x) {
|
||||
|
||||
/* don't operate on any playlist more than once, which could
|
||||
* happen if "all playlists" is enabled, but there is more
|
||||
* than 1 track using playlists "from" a given track.
|
||||
* happen if there is more than 1 track using the same
|
||||
* playlist.
|
||||
*/
|
||||
|
||||
set<boost::shared_ptr<Playlist> > pl;
|
||||
|
||||
if (all_playlists) {
|
||||
RouteTimeAxisView* rtav = dynamic_cast<RouteTimeAxisView*> (*x);
|
||||
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 ());
|
||||
}
|
||||
if ((*x)->playlist ()) {
|
||||
pl.insert ((*x)->playlist ());
|
||||
}
|
||||
|
||||
for (set<boost::shared_ptr<Playlist> >::iterator i = pl.begin(); i != pl.end(); ++i) {
|
||||
|
Loading…
Reference in New Issue
Block a user