diff --git a/src/SeerVariableLoggerBrowserWidget.cpp b/src/SeerVariableLoggerBrowserWidget.cpp index 0ddac5c..a78c0e8 100644 --- a/src/SeerVariableLoggerBrowserWidget.cpp +++ b/src/SeerVariableLoggerBrowserWidget.cpp @@ -258,7 +258,17 @@ void SeerVariableLoggerBrowserWidget::handleItemCreate (QTreeWidgetItem* parentI parentItem->setText(3, id_text); // Convert to a list of name/value pairs. - QStringList nv_pairs = Seer::parseCommaList(text, '{', '}'); + QStringList nv_pairs; + if (text.startsWith("{")) + { + // String might describe an array: {a=1, b=1},{a=1, b=1},{a=1, b=1},{a=1, b=1} + // parentItem->text(0) is timestamp -> parent name should be parentItem->text(1) + nv_pairs = Seer::parseArray(parentItem->text(1), text); + } + else + { + nv_pairs = Seer::parseCommaList(text, '{', '}'); + } // Go through each pair and add the name and its value to the tree. for (const auto& nv : nv_pairs) {