mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-12 07:48:41 +00:00
Merge pull request #1258 from Diapolo/RPCCon_never_0_Blocks
GUI RPC Console: if there is no current block number available display N/A on totalBlocks label,...
This commit is contained in:
commit
2692ed3f01
@ -232,7 +232,8 @@ void RPCConsole::setNumBlocks(int count)
|
|||||||
ui->numberOfBlocks->setText(QString::number(count));
|
ui->numberOfBlocks->setText(QString::number(count));
|
||||||
if(clientModel)
|
if(clientModel)
|
||||||
{
|
{
|
||||||
ui->totalBlocks->setText(QString::number(clientModel->getNumBlocksOfPeers()));
|
// If there is no current number available display N/A instead of 0, which can't ever be true
|
||||||
|
ui->totalBlocks->setText(clientModel->getNumBlocksOfPeers() == 0 ? tr("N/A") : QString::number(clientModel->getNumBlocksOfPeers()));
|
||||||
ui->lastBlockTime->setText(clientModel->getLastBlockDate().toString());
|
ui->lastBlockTime->setText(clientModel->getLastBlockDate().toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user