Fix playlist use-count 1/2
This commit is contained in:
parent
8489810cfb
commit
fbce94d55d
@ -1330,7 +1330,6 @@ RouteTimeAxisView::cut_copy_clear (Selection& selection, CutCopyOp op)
|
|||||||
playlist->ripple (time.start_time(), -time.length(), NULL);
|
playlist->ripple (time.start_time(), -time.length(), NULL);
|
||||||
}
|
}
|
||||||
playlist->rdiff_and_add_command (_session);
|
playlist->rdiff_and_add_command (_session);
|
||||||
what_we_got->release ();
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -254,6 +254,7 @@ Selection::toggle (std::shared_ptr<Playlist> pl)
|
|||||||
playlists.push_back(pl);
|
playlists.push_back(pl);
|
||||||
} else {
|
} else {
|
||||||
playlists.erase (i);
|
playlists.erase (i);
|
||||||
|
pl->release ();
|
||||||
}
|
}
|
||||||
|
|
||||||
PlaylistsChanged ();
|
PlaylistsChanged ();
|
||||||
@ -591,6 +592,7 @@ Selection::remove (std::shared_ptr<Playlist> track)
|
|||||||
list<std::shared_ptr<Playlist> >::iterator i;
|
list<std::shared_ptr<Playlist> >::iterator i;
|
||||||
if ((i = find (playlists.begin(), playlists.end(), track)) != playlists.end()) {
|
if ((i = find (playlists.begin(), playlists.end(), track)) != playlists.end()) {
|
||||||
playlists.erase (i);
|
playlists.erase (i);
|
||||||
|
(*i)->release ();
|
||||||
PlaylistsChanged();
|
PlaylistsChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -605,6 +607,7 @@ Selection::remove (const list<std::shared_ptr<Playlist> >& pllist)
|
|||||||
list<std::shared_ptr<Playlist> >::iterator x;
|
list<std::shared_ptr<Playlist> >::iterator x;
|
||||||
|
|
||||||
if ((x = find (playlists.begin(), playlists.end(), (*i))) != playlists.end()) {
|
if ((x = find (playlists.begin(), playlists.end(), (*i))) != playlists.end()) {
|
||||||
|
(*x)->release ();
|
||||||
playlists.erase (x);
|
playlists.erase (x);
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
@ -832,7 +835,6 @@ Selection::empty (bool internal_selection)
|
|||||||
playlists.empty () &&
|
playlists.empty () &&
|
||||||
lines.empty () &&
|
lines.empty () &&
|
||||||
time.empty () &&
|
time.empty () &&
|
||||||
playlists.empty () &&
|
|
||||||
markers.empty() &&
|
markers.empty() &&
|
||||||
triggers.empty()
|
triggers.empty()
|
||||||
;
|
;
|
||||||
|
Loading…
Reference in New Issue
Block a user