mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/graph] Fix bug in values controller in willDisplayCellAtLocation
Change-Id: Ic3f166caac9d58205a9b896de2a288afe13c66d4
This commit is contained in:
@@ -109,7 +109,6 @@ Button * ValuesController::buttonAtIndex(int index, ButtonRowController::Positio
|
||||
}
|
||||
|
||||
void ValuesController::willDisplayCellAtLocation(HighlightCell * cell, int i, int j) {
|
||||
TextFieldDelegateApp * myApp = (TextFieldDelegateApp *)app();
|
||||
willDisplayCellAtLocationWithDisplayMode(cell, i, j, Expression::FloatDisplayMode::Default);
|
||||
if (cellAtLocationIsEditable(i, j)) {
|
||||
return;
|
||||
@@ -129,9 +128,8 @@ void ValuesController::willDisplayCellAtLocation(HighlightCell * cell, int i, in
|
||||
}
|
||||
// The cell is a value cell
|
||||
EvenOddBufferTextCell * myValueCell = (EvenOddBufferTextCell *)cell;
|
||||
Function * function = functionAtColumn(i);
|
||||
float x = m_interval.element(j-1);
|
||||
Complex::convertFloatToText(function->evaluateAtAbscissa(x, myApp->localContext()), buffer, Complex::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits), Constant::LargeNumberOfSignificantDigits);
|
||||
Complex::convertFloatToText(evaluationOfAbscissaAtColumn(x, i), buffer, Complex::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits), Constant::LargeNumberOfSignificantDigits);
|
||||
myValueCell->setText(buffer);
|
||||
}
|
||||
}
|
||||
@@ -277,5 +275,11 @@ int ValuesController::maxNumberOfElements() const {
|
||||
return Interval::k_maxNumberOfElements;
|
||||
}
|
||||
|
||||
float ValuesController::evaluationOfAbscissaAtColumn(float abscissa, int columnIndex) {
|
||||
Function * function = functionAtColumn(columnIndex);
|
||||
TextFieldDelegateApp * myApp = (TextFieldDelegateApp *)app();
|
||||
return function->evaluateAtAbscissa(abscissa, myApp->localContext());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user