fix(cpn): initialisation of log viewer x-axis should use log time, not system time (#4691)
This commit is contained in:
@@ -848,7 +848,7 @@ void LogsDialog::plotLogs()
|
|||||||
rowCount = ui->logTable->rowCount();
|
rowCount = ui->logTable->rowCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
plots.min_x = QDateTime::currentDateTime().toTime_t();
|
plots.min_x = INVALID_MIN;
|
||||||
plots.max_x = 0;
|
plots.max_x = 0;
|
||||||
|
|
||||||
foreach (QTableWidgetItem *plot, ui->FieldsTW->selectedItems()) {
|
foreach (QTableWidgetItem *plot, ui->FieldsTW->selectedItems()) {
|
||||||
@@ -892,7 +892,11 @@ void LogsDialog::plotLogs()
|
|||||||
}
|
}
|
||||||
plotCoords.x.push_back(time);
|
plotCoords.x.push_back(time);
|
||||||
|
|
||||||
if (plots.min_x > time) plots.min_x = time;
|
if(plots.min_x == INVALID_MIN)
|
||||||
|
plots.min_x = time;
|
||||||
|
else
|
||||||
|
if (plots.min_x > time) plots.min_x = time;
|
||||||
|
|
||||||
if (plots.max_x < time) plots.max_x = time;
|
if (plots.max_x < time) plots.max_x = time;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user