Merge pull request #173 from fsb4000/Qt
authorCryptoManiac <CryptoManiac@users.noreply.github.com>
Fri, 20 Feb 2015 23:59:31 +0000 (02:59 +0300)
committerCryptoManiac <CryptoManiac@users.noreply.github.com>
Fri, 20 Feb 2015 23:59:31 +0000 (02:59 +0300)
производительность Qt

src/qt/walletmodel.cpp

index f7658b0..d0620ca 100644 (file)
@@ -117,9 +117,6 @@ void WalletModel::checkBalanceChanged()
 
 void WalletModel::updateTransaction(const QString &hash, int status)
 {
-    if(transactionTableModel)
-        transactionTableModel->updateTransaction(hash, status);
-
     // Balance and number of transactions might have changed
     checkBalanceChanged();
 
@@ -128,6 +125,9 @@ void WalletModel::updateTransaction(const QString &hash, int status)
     {
         cachedNumTransactions = newNumTransactions;
         emit numTransactionsChanged(newNumTransactions);
+
+        if(transactionTableModel)
+            transactionTableModel->updateTransaction(hash, status);
     }
 }