Quick GUI: Skip confirming deletion if undo supported

This commit is contained in:
Marius Kittler 2018-11-22 22:09:54 +01:00
parent 776dc06431
commit d4437e10b7
1 changed files with 6 additions and 0 deletions

View File

@ -72,6 +72,12 @@ Kirigami.ScrollablePage {
}
function confirmDeletion(entryName, entryIndex) {
// skip if undo is supported
if (nativeInterface.undoStack) {
entryModel.removeRows(entryIndex, 1, rootIndex)
return
}
var isNode = entryModel.isNode(entryModel.index(entryIndex, 0,
rootIndex))
var entryType = isNode ? qsTr("category ") : qsTr("account ")