From 2b6507f27c5427cfc928b6e76b714978828e80ee Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Tue, 16 Jan 2018 17:51:29 +0100 Subject: [PATCH] Fix removing cancelled transactions BUG: 388915 --- discover/qml/ProgressView.qml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/discover/qml/ProgressView.qml b/discover/qml/ProgressView.qml index ef03f885..3506c7f0 100644 --- a/discover/qml/ProgressView.qml +++ b/discover/qml/ProgressView.qml @@ -40,7 +40,7 @@ Kirigami.BasicListItem { } onTransactionRemoved: { - if (trans.status == Transaction.CancelledStatus || !trans.resource) { + if (!trans.resource) { var id = progressModel.applicationAt(trans.resource) if(id>=0) progressModel.remove(id) @@ -69,7 +69,10 @@ Kirigami.BasicListItem { Component { id: listenerComp TransactionListener { - onCancelled: progressModel.remove(index) + property int index: -1 + onCancelled: { + progressModel.remove(index) + } } } @@ -85,7 +88,7 @@ Kirigami.BasicListItem { Navigation.openApplication(model.application) } } - readonly property QtObject listener: listenerComp.createObject(del, (model.transaction.resource ? {resource: model.transaction.resource} : {transaction: model.transaction})) + readonly property QtObject listener: listenerComp.createObject(del, (model.transaction.resource ? {resource: model.transaction.resource, index: index} : {transaction: model.transaction, index: index})) ColumnLayout { width: parent.width -- GitLab