Fix bug found by @projectkk2glider: X axis was messed up in fly sessions.
This commit is contained in:
@@ -593,17 +593,20 @@ void logsDialog::plotLogs()
|
|||||||
|
|
||||||
for (int row = 0; row < rowCount; row++) {
|
for (int row = 0; row < rowCount; row++) {
|
||||||
QTableWidgetItem *logValue;
|
QTableWidgetItem *logValue;
|
||||||
|
|
||||||
if (hasLogSelection) {
|
|
||||||
logValue = ui->logTable->item(selectedRows.at(row), plotColumn);
|
|
||||||
} else {
|
|
||||||
logValue = ui->logTable->item(row, plotColumn);
|
|
||||||
}
|
|
||||||
|
|
||||||
double y;
|
double y;
|
||||||
double time;
|
double time;
|
||||||
QString time_str;
|
QString time_str;
|
||||||
|
|
||||||
|
if (hasLogSelection) {
|
||||||
|
logValue = ui->logTable->item(selectedRows.at(row), plotColumn);
|
||||||
|
time_str = ui->logTable->item(selectedRows.at(row), 0)->text() +
|
||||||
|
QString(" ") + ui->logTable->item(selectedRows.at(row), 1)->text();
|
||||||
|
} else {
|
||||||
|
logValue = ui->logTable->item(row, plotColumn);
|
||||||
|
time_str = ui->logTable->item(row, 0)->text() + QString(" ") +
|
||||||
|
ui->logTable->item(row, 1)->text();
|
||||||
|
}
|
||||||
|
|
||||||
y = logValue->text().toDouble();
|
y = logValue->text().toDouble();
|
||||||
plotCoords.y.push_back(y);
|
plotCoords.y.push_back(y);
|
||||||
|
|
||||||
@@ -613,8 +616,6 @@ void logsDialog::plotLogs()
|
|||||||
plotCoords.max_y = y;
|
plotCoords.max_y = y;
|
||||||
}
|
}
|
||||||
|
|
||||||
time_str = ui->logTable->item(row, 0)->text() + QString(" ")
|
|
||||||
+ ui->logTable->item(row, 1)->text();
|
|
||||||
if (time_str.contains('.')) {
|
if (time_str.contains('.')) {
|
||||||
time = QDateTime::fromString(time_str, "yyyy-MM-dd HH:mm:ss.zzz")
|
time = QDateTime::fromString(time_str, "yyyy-MM-dd HH:mm:ss.zzz")
|
||||||
.toTime_t();
|
.toTime_t();
|
||||||
|
|||||||
Reference in New Issue
Block a user