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

@ -235,3 +235,12 @@ void ImageProxyModel::deleteImage(const int &row) {
auto model = qobject_cast<ImageSqlModel *>(sourceModel());
model->deleteImage(row);
}
void ImageProxyModel::deleteImages(const QVector<int> &rows) {
auto model = qobject_cast<ImageSqlModel *>(sourceModel());
qDebug() << "DELETING!!!!!!!!!!!!!!!!!!!!!!!" << rows;
for (int i = rows.size() - 1; i >= 0; i--) {
qDebug() << "deleting" << rows.at(i);
model->deleteImage(rows.at(i));
}
}