From daa8dbd928b617265d519dfea6d00c18340ad8e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Softwareb=C3=BCro=20Krekeler?= Date: Fri, 10 May 2019 17:13:16 +0200 Subject: [PATCH] Document revision improvements Allow revision with recently received InstandSend. No document selection if drag&drop was canceled. --- src/qt/documentlist.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/qt/documentlist.cpp b/src/qt/documentlist.cpp index a4b3fb607b58d..763f96e0b5838 100644 --- a/src/qt/documentlist.cpp +++ b/src/qt/documentlist.cpp @@ -305,7 +305,8 @@ QString Document::writeToBlockchain() QJsonObject jobj = jarval.toObject(); tmpamount = jobj.value("amount").toDouble(); if(jobj.value("spendable").toBool() - && jobj.value("confirmations").toInt() >= TransactionRecord::RecommendedNumConfirmations + //the following would prevent a revision with recently received InstandSend + //&& jobj.value("confirmations").toInt() >= TransactionRecord::RecommendedNumConfirmations && tmpamount <= 55 // max input is just a safety value to avoid loss of change && tmpamount >= minDocRevFee && tmpamount < mininput) { @@ -618,8 +619,10 @@ void DocumentList::handleNewFiles(const QStringList newFiles) { QString lastAddedFile = addFiles(newFiles); - LoadFiles(); - selectDocument(lastAddedFile); + if (!lastAddedFile.isEmpty()) { + LoadFiles(); + selectDocument(lastAddedFile); + } } void DocumentList::onlistViewDocumentsChanged(const QModelIndex ¤t, const QModelIndex &previous)