Ref T515, avoid unnecessary updating (last result ts) and UI adjustments

This commit is contained in:
Klaus Basan
2019-01-28 22:26:59 +01:00
committed by Mat Sutcliffe
parent 610e1559e1
commit 13357516fa
4 changed files with 12 additions and 24 deletions

View File

@@ -39,9 +39,12 @@ namespace BlackGui
// 1st init when running in distributed environment
QPointer<CAircraftModelValidationComponent> myself(this);
const qint64 lastResults = m_lastResults;
QTimer::singleShot(2500, this, [ = ]
{
if (!myself || !sGui || sGui->isShuttingDown()) { return; }
if (m_lastResults > lastResults) { return; } // values received in meantime
myself->requestLastResults();
});
}
@@ -53,6 +56,7 @@ namespace BlackGui
{
Q_UNUSED(simulator);
Q_UNUSED(valid);
m_lastResults = QDateTime::currentMSecsSinceEpoch();
ui->tvp_InvalidModels->updateContainerMaybeAsync(invalid);
ui->comp_Simulator->setValue(simulator);
ui->comp_Messages->clear();