Fix empty tooltip during sync under specific conditions (#1637)
* Fix empty tooltip during sync under specific conditions * Move IsBlockchainSynced check
This commit is contained in:
parent
753b1e486b
commit
026ad8421a
@ -1065,6 +1065,10 @@ void BitcoinGUI::setAdditionalDataSyncProgress(double nSyncProgress)
|
|||||||
if(!clientModel)
|
if(!clientModel)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// No additional data sync should be happening while blockchain is not synced, nothing to update
|
||||||
|
if(!masternodeSync.IsBlockchainSynced())
|
||||||
|
return;
|
||||||
|
|
||||||
// Prevent orphan statusbar messages (e.g. hover Quit in main menu, wait until chain-sync starts -> garbelled text)
|
// Prevent orphan statusbar messages (e.g. hover Quit in main menu, wait until chain-sync starts -> garbelled text)
|
||||||
statusBar()->clearMessage();
|
statusBar()->clearMessage();
|
||||||
|
|
||||||
@ -1073,8 +1077,6 @@ void BitcoinGUI::setAdditionalDataSyncProgress(double nSyncProgress)
|
|||||||
// Set icon state: spinning if catching up, tick otherwise
|
// Set icon state: spinning if catching up, tick otherwise
|
||||||
QString theme = GUIUtil::getThemeName();
|
QString theme = GUIUtil::getThemeName();
|
||||||
|
|
||||||
if(masternodeSync.IsBlockchainSynced())
|
|
||||||
{
|
|
||||||
QString strSyncStatus;
|
QString strSyncStatus;
|
||||||
tooltip = tr("Up to date") + QString(".<br>") + tooltip;
|
tooltip = tr("Up to date") + QString(".<br>") + tooltip;
|
||||||
|
|
||||||
@ -1102,7 +1104,6 @@ void BitcoinGUI::setAdditionalDataSyncProgress(double nSyncProgress)
|
|||||||
strSyncStatus = QString(masternodeSync.GetSyncStatus().c_str());
|
strSyncStatus = QString(masternodeSync.GetSyncStatus().c_str());
|
||||||
progressBarLabel->setText(strSyncStatus);
|
progressBarLabel->setText(strSyncStatus);
|
||||||
tooltip = strSyncStatus + QString("<br>") + tooltip;
|
tooltip = strSyncStatus + QString("<br>") + tooltip;
|
||||||
}
|
|
||||||
|
|
||||||
// Don't word-wrap this (fixed-width) tooltip
|
// Don't word-wrap this (fixed-width) tooltip
|
||||||
tooltip = QString("<nobr>") + tooltip + QString("</nobr>");
|
tooltip = QString("<nobr>") + tooltip + QString("</nobr>");
|
||||||
|
Loading…
Reference in New Issue
Block a user