Browse Source

Merge pull request #1646 from Diapolo/only_upd_changed_vals

only update cached values in ClientModel::updateTimer() when they are changed, and set cached values before signal is emitted
miguelfreitas
Wladimir J. van der Laan 12 years ago
parent
commit
381e87cbd2
  1. 6
      src/qt/clientmodel.cpp

6
src/qt/clientmodel.cpp

@ -60,10 +60,12 @@ void ClientModel::updateTimer()
int newNumBlocksOfPeers = getNumBlocksOfPeers(); int newNumBlocksOfPeers = getNumBlocksOfPeers();
if(cachedNumBlocks != newNumBlocks || cachedNumBlocksOfPeers != newNumBlocksOfPeers) if(cachedNumBlocks != newNumBlocks || cachedNumBlocksOfPeers != newNumBlocksOfPeers)
emit numBlocksChanged(newNumBlocks, newNumBlocksOfPeers); {
cachedNumBlocks = newNumBlocks; cachedNumBlocks = newNumBlocks;
cachedNumBlocksOfPeers = newNumBlocksOfPeers; cachedNumBlocksOfPeers = newNumBlocksOfPeers;
emit numBlocksChanged(newNumBlocks, newNumBlocksOfPeers);
}
} }
void ClientModel::updateNumConnections(int numConnections) void ClientModel::updateNumConnections(int numConnections)

Loading…
Cancel
Save