Commit 3dd5866f authored by tstellanova's avatar tstellanova

refresh tree display after list recv

parent 6a173001
......@@ -202,6 +202,21 @@ void QGCParamWidget::handleParameterUpdate(int componentId, const QString& param
void QGCParamWidget::handleParameterListUpToDate()
{
tree->collapseAll();
//rewrite the component item tree after receiving the full list
QMap<int, QMap<QString, QVariant>*>::iterator i;
QMap<int, QMap<QString, QVariant>*>* onboardParams = paramDataModel->getOnboardParameters();
for (i = onboardParams->begin(); i != onboardParams->end(); ++i) {
int compId = i.key();
QMap<QString, QVariant>* paramPairs = onboardParams->value(compId);
QMap<QString, QVariant>::iterator j;
for (j = paramPairs->begin(); j != paramPairs->end(); j++) {
updateParameterDisplay(compId, j.key(),j.value());
}
}
// Expand visual tree
tree->expandItem(tree->topLevelItem(0));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment