[apps/graph/values_controller] Fix absoluteColumnForValuesColumn

Abscissa columns that should not appear in the table were counted
This commit is contained in:
Ruben Dashyan
2019-11-12 15:00:19 +01:00
committed by EmilieNumworks
parent b846308866
commit 3677e7b191

View File

@@ -255,9 +255,10 @@ int ValuesController::absoluteColumnForValuesColumn(int column) {
int valuesColumns = 0;
int plotTypeIndex = 0;
do {
abscissaColumns++;
assert(plotTypeIndex < Shared::ContinuousFunction::k_numberOfPlotTypes);
valuesColumns += m_numberOfValuesColumnsForType[plotTypeIndex++];
const int numberOfValuesColumnsForType = m_numberOfValuesColumnsForType[plotTypeIndex++];
valuesColumns += numberOfValuesColumnsForType;
abscissaColumns += (numberOfValuesColumnsForType > 0);
} while (valuesColumns <= column);
return column + abscissaColumns;
}