mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Fix Regression DataTable
... if a column has no data - just do not try to add the missing rows
This commit is contained in:
@@ -1160,14 +1160,17 @@ LTMWindow::dataTable(bool html)
|
||||
|
||||
// align the starting X values of all columns using the
|
||||
// lowest xValue and highest xValue as borders
|
||||
if (lowestFirstXvalue != highestFirstXvalue) {
|
||||
// for columns which have data at all - and if there is something to adjust
|
||||
if (!firstXvalue && lowestFirstXvalue != highestFirstXvalue) {
|
||||
for (int i = 0; i< columns.count(); i++) {
|
||||
double xValue = columns[i].x[0];
|
||||
while (columns[i].x[0] > lowestFirstXvalue) {
|
||||
xValue--;
|
||||
columns[i].x.prepend(xValue);
|
||||
columns[i].y.prepend(0.0);
|
||||
columns[i].n++;
|
||||
if (columns[i].n > 0) {
|
||||
double xValue = columns[i].x[0];
|
||||
while (columns[i].x[0] > lowestFirstXvalue) {
|
||||
xValue--;
|
||||
columns[i].x.prepend(xValue);
|
||||
columns[i].y.prepend(0.0);
|
||||
columns[i].n++;
|
||||
}
|
||||
}
|
||||
}
|
||||
// adjust number of visible rows in table
|
||||
|
||||
Reference in New Issue
Block a user