13
0

Fix playlist use-count 1/2

This commit is contained in:
Robin Gareus 2023-06-10 02:23:53 +02:00
parent 8489810cfb
commit fbce94d55d
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 3 additions and 2 deletions

View File

@ -1330,7 +1330,6 @@ RouteTimeAxisView::cut_copy_clear (Selection& selection, CutCopyOp op)
playlist->ripple (time.start_time(), -time.length(), NULL);
}
playlist->rdiff_and_add_command (_session);
what_we_got->release ();
}
break;
}

View File

@ -254,6 +254,7 @@ Selection::toggle (std::shared_ptr<Playlist> pl)
playlists.push_back(pl);
} else {
playlists.erase (i);
pl->release ();
}
PlaylistsChanged ();
@ -591,6 +592,7 @@ Selection::remove (std::shared_ptr<Playlist> track)
list<std::shared_ptr<Playlist> >::iterator i;
if ((i = find (playlists.begin(), playlists.end(), track)) != playlists.end()) {
playlists.erase (i);
(*i)->release ();
PlaylistsChanged();
}
}
@ -605,6 +607,7 @@ Selection::remove (const list<std::shared_ptr<Playlist> >& pllist)
list<std::shared_ptr<Playlist> >::iterator x;
if ((x = find (playlists.begin(), playlists.end(), (*i))) != playlists.end()) {
(*x)->release ();
playlists.erase (x);
changed = true;
}
@ -832,7 +835,6 @@ Selection::empty (bool internal_selection)
playlists.empty () &&
lines.empty () &&
time.empty () &&
playlists.empty () &&
markers.empty() &&
triggers.empty()
;