a working multi delete in libraries

This commit is contained in:
Chris Cochrun 2023-03-05 06:51:47 -06:00
parent 8eeb3b5151
commit 6c33e52ea3
10 changed files with 51 additions and 14 deletions

View file

@ -760,3 +760,13 @@ void SongProxyModel::deleteSong(const int &row) {
auto model = qobject_cast<SongSqlModel *>(sourceModel());
model->deleteSong(row);
}
void SongProxyModel::deleteSongs(const QVector<int> &rows) {
auto model = qobject_cast<SongSqlModel *>(sourceModel());
qDebug() << "DELETING!!!!!!!!!!!!!!!!!!!!!!!" << rows;
for (int i = rows.size() - 1; i >= 0; i--) {
qDebug() << "deleting" << rows.at(i);
model->deleteSong(rows.at(i));
}
}