[apps/*/values_controller] Set correct parameter message

This commit is contained in:
Ruben Dashyan
2019-09-05 11:57:05 +02:00
parent c8206d51f2
commit aa5c5219da
6 changed files with 13 additions and 15 deletions

View File

@@ -74,9 +74,7 @@ void ValuesController::willDisplayCellAtLocation(HighlightCell * cell, int i, in
Shared::ValuesController::willDisplayCellAtLocation(cell, i, j);
if (typeAtLoc == k_abscissaTitleCellType) {
AbscissaTitleCell * myTitleCell = (AbscissaTitleCell *)cell;
Ion::Storage::Record record = recordAtColumn(i+1);
Shared::ExpiringPointer<CartesianFunction> function = functionStore()->modelForRecord(record);
myTitleCell->setMessage(function->parameterMessageName());
myTitleCell->setMessage(valuesParameterMessageAtColumn(i));
myTitleCell->setSeparatorLeft(i > 0);
return;
}
@@ -155,6 +153,10 @@ Shared::Interval * ValuesController::intervalAtColumn(int columnIndex) {
return App::app()->intervalForType(plotTypeAtColumn(&columnIndex));
}
I18n::Message ValuesController::valuesParameterMessageAtColumn(int columnIndex) const {
return CartesianFunction::ParameterMessageForPlotType(plotTypeAtColumn(&columnIndex));
}
CartesianFunction::PlotType ValuesController::plotTypeAtColumn(int * i) const {
int plotTypeIndex = 0;
while (plotTypeIndex < CartesianFunction::k_numberOfPlotTypes && *i >= m_numberOfColumnsForType[plotTypeIndex]) {
@@ -196,10 +198,6 @@ ViewController * ValuesController::functionParameterController() {
return &m_functionParameterController;
}
I18n::Message ValuesController::valuesParameterControllerPageTitle() const {
return I18n::Message::X;
}
double ValuesController::evaluationOfAbscissaAtColumn(double abscissa, int columnIndex) {
bool isDerivative = false;
Ion::Storage::Record record = recordAtColumn(columnIndex, &isDerivative);