Skip to content

Commit

Permalink
Document revision improvements
Browse files Browse the repository at this point in the history
Allow revision with recently received InstandSend.
No document selection if drag&drop was canceled.
  • Loading branch information
Krekeler committed May 10, 2019
1 parent 161758e commit daa8dbd
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/qt/documentlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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 &current, const QModelIndex &previous)
Expand Down

0 comments on commit daa8dbd

Please sign in to comment.