From 91f53523a54b2388cff6434f7f023466e1df7b1e Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Sun, 23 Aug 2015 15:03:57 -0700 Subject: [PATCH] Turn on showErrorsInToolbar at appropriate time Also fixed case where UASMessageHandler reported errors but walking list turned up no errors --- src/FactSystem/ParameterLoader.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/FactSystem/ParameterLoader.cc b/src/FactSystem/ParameterLoader.cc index f1e425271..30e39784e 100644 --- a/src/FactSystem/ParameterLoader.cc +++ b/src/FactSystem/ParameterLoader.cc @@ -759,6 +759,7 @@ void ParameterLoader::_checkInitialLoadComplete(void) if (msgHandler->getErrorCountTotal()) { QString errors; bool firstError = true; + bool errorsFound = false; msgHandler->lockAccess(); foreach (UASMessage* msg, msgHandler->messages()) { @@ -769,11 +770,13 @@ void ParameterLoader::_checkInitialLoadComplete(void) errors += " - "; errors += msg->getText(); firstError = false; + errorsFound = true; } } + msgHandler->showErrorsInToolbar(); msgHandler->unlockAccess(); - if (!firstError) { + if (errorsFound) { QString errorMsg = QString("Errors were detected during vehicle startup. You should resolve these prior to flight.\n%1").arg(errors); qgcApp()->showToolBarMessage(errorMsg); } -- 2.22.0