Commit 263cb7c1 authored by pixhawk's avatar pixhawk

Testing data plot iew

parent 8e6b633a
......@@ -252,7 +252,6 @@ void QGCDataPlot2D::loadCsvLog(QString file, QString xAxisName, QString yAxisFil
ui->xAxis->clear();
ui->yAxis->clear();
ui->xAxis->addItem("*");
int curveNameIndex = 0;
int xValueIndex = curveNames.indexOf(xAxisName);
......@@ -263,14 +262,17 @@ void QGCDataPlot2D::loadCsvLog(QString file, QString xAxisName, QString yAxisFil
if (curveNameIndex != xValueIndex)
{
// FIXME Add check for y value filter
yValues.insert(curveName, new QVector<double>());
ui->xAxis->addItem(curveName);
// Add separator starting with second item
if (curveNameIndex > 0 && curveNameIndex < curveNames.size())
if ((ui->yAxis->text() == "") && yValues.contains(curveName))
{
ui->yAxis->setText(ui->yAxis->text()+"|");
yValues.insert(curveName, new QVector<double>());
ui->xAxis->addItem(curveName);
// Add separator starting with second item
if (curveNameIndex > 0 && curveNameIndex < curveNames.size())
{
ui->yAxis->setText(ui->yAxis->text()+"|");
}
ui->yAxis->setText(ui->yAxis->text()+curveName);
}
ui->yAxis->setText(ui->yAxis->text()+curveName);
}
curveNameIndex++;
}
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<author/>
<comment/>
<exportmacro/>
<class>QGCFirmwareUpdate</class>
<widget class="QWidget" name="QGCFirmwareUpdate">
<property name="geometry">
......@@ -16,6 +14,6 @@
<string>Form</string>
</property>
</widget>
<pixmapfunction/>
<resources/>
<connections/>
</ui>
......@@ -270,7 +270,16 @@ QColor IncrementalPlot::getColorForCurve(QString id)
void IncrementalPlot::removeData()
{
foreach (QwtPlotCurve* curve, d_curve)
{
delete curve;
}
d_curve.clear();
foreach (CurveData* data, d_data)
{
delete data;
}
d_data.clear();
resetScaling();
replot();
......
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