diff --git a/src/CSV/Export.cpp b/src/CSV/Export.cpp index 668f706e..56aa8bd9 100644 --- a/src/CSV/Export.cpp +++ b/src/CSV/Export.cpp @@ -195,12 +195,10 @@ void Export::writeValues() // Construct dataset title from group, dataset title & units QString title; if (datasetUnits.isEmpty()) - title = QString("(%1) %2").arg(groupTitle).arg(datasetTitle); + title = QString("(%1) %2").arg(groupTitle, datasetTitle); else title = QString("(%1) %2 [%3]") - .arg(groupTitle) - .arg(datasetTitle) - .arg(datasetUnits); + .arg(groupTitle, datasetTitle, datasetUnits); // Add dataset title & value to lists titles.append(title); diff --git a/src/JSON/Dataset.cpp b/src/JSON/Dataset.cpp index e8c8b26e..df11b4d9 100644 --- a/src/JSON/Dataset.cpp +++ b/src/JSON/Dataset.cpp @@ -113,7 +113,7 @@ bool Dataset::read(const QJsonObject &object) widget = widget.replace("\n", ""); widget = widget.replace("\r", ""); - if (!value.isEmpty()) + if (!value.isEmpty() && !title.isEmpty()) { m_graph = graph; m_title = title;