a working multi delete in libraries
This commit is contained in:
parent
8eeb3b5151
commit
6c33e52ea3
10 changed files with 51 additions and 14 deletions
|
@ -46,8 +46,8 @@ Item {
|
|||
editType = "song";
|
||||
editSwitch(libraryList.currentIndex);
|
||||
})
|
||||
deleteItemFunction: (function(index) {
|
||||
songProxyModel.deleteSong(index)
|
||||
deleteItemFunction: (function(rows) {
|
||||
songProxyModel.deleteSongs(rows)
|
||||
})
|
||||
|
||||
Component.onCompleted: selectedLibrary = "song";
|
||||
|
@ -72,8 +72,8 @@ Item {
|
|||
newItemFunction: (function() {
|
||||
videoProxyModel.setFilterRegularExpression("");
|
||||
})
|
||||
deleteItemFunction: (function(index) {
|
||||
videoProxyModel.deleteVideo(index)
|
||||
deleteItemFunction: (function(rows) {
|
||||
videoProxyModel.deleteVideos(rows)
|
||||
})
|
||||
|
||||
}
|
||||
|
@ -97,8 +97,8 @@ Item {
|
|||
newItemFunction: (function() {
|
||||
imageProxyModel.setFilterRegularExpression("");
|
||||
})
|
||||
deleteItemFunction: (function(index) {
|
||||
imageProxyModel.deleteImage(index)
|
||||
deleteItemFunction: (function(rows) {
|
||||
imageProxyModel.deleteImages(rows)
|
||||
})
|
||||
|
||||
}
|
||||
|
@ -122,8 +122,8 @@ Item {
|
|||
newItemFunction: (function() {
|
||||
presProxyModel.setFilterRegularExpression("");
|
||||
})
|
||||
deleteItemFunction: (function(index) {
|
||||
presProxyModel.deletePresentation(index)
|
||||
deleteItemFunction: (function(rows) {
|
||||
presProxyModel.deletePresentations(rows)
|
||||
})
|
||||
|
||||
}
|
||||
|
|
|
@ -360,13 +360,9 @@ ColumnLayout {
|
|||
var selection = [];
|
||||
var length = selectionModel.selectedIndexes.length;
|
||||
for (let i = 0; i < length; i++) {
|
||||
selection.push(selectionModel.selectedIndexes[i]);
|
||||
console.log(selection[i].row);
|
||||
/* root.deleteItemFunction(selection[i].row); */
|
||||
}
|
||||
for (let i = 0; i < length; i++) {
|
||||
root.deleteItemFunction(selection[i].row);
|
||||
selection.push(selectionModel.selectedIndexes[i].row);
|
||||
}
|
||||
root.deleteItemFunction(selection);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue