aboutsummaryrefslogtreecommitdiff
path: root/src/qt/clientmodel.cpp
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2012-08-01 23:32:32 +0200
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2012-08-01 23:32:32 +0200
commit75578d60f350006ec77cbc47daef20b1726b96af (patch)
tree9f73756a321e551a6b20132ee6a60ea655814426 /src/qt/clientmodel.cpp
parent8ce7915aad505fd6e57f599b5b43fc241d8b4cb4 (diff)
downloadbitcoin-75578d60f350006ec77cbc47daef20b1726b96af.tar.xz
only update cached values in ClientModel::updateTimer() when they are changed
Diffstat (limited to 'src/qt/clientmodel.cpp')
-rw-r--r--src/qt/clientmodel.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp
index 8fcc4e650e..43bce6f289 100644
--- a/src/qt/clientmodel.cpp
+++ b/src/qt/clientmodel.cpp
@@ -60,10 +60,12 @@ void ClientModel::updateTimer()
int newNumBlocksOfPeers = getNumBlocksOfPeers();
if(cachedNumBlocks != newNumBlocks || cachedNumBlocksOfPeers != newNumBlocksOfPeers)
- emit numBlocksChanged(newNumBlocks, newNumBlocksOfPeers);
+ {
+ cachedNumBlocks = newNumBlocks;
+ cachedNumBlocksOfPeers = newNumBlocksOfPeers;
- cachedNumBlocks = newNumBlocks;
- cachedNumBlocksOfPeers = newNumBlocksOfPeers;
+ emit numBlocksChanged(newNumBlocks, newNumBlocksOfPeers);
+ }
}
void ClientModel::updateNumConnections(int numConnections)