[apps/graph] ValuesController: change display of the parametric column -

display only one column for (x;y) values
This commit is contained in:
Émilie Feral
2019-09-24 16:31:09 +02:00
committed by LeaNumworks
parent 6a983a5bdf
commit bf23e0f8da
6 changed files with 38 additions and 42 deletions

View File

@@ -1,6 +1,5 @@
#include "values_controller.h"
#include "function_app.h"
#include "poincare_helpers.h"
#include <poincare/preferences.h>
#include <assert.h>
@@ -125,14 +124,13 @@ void ValuesController::willDisplayCellAtLocation(HighlightCell * cell, int i, in
willDisplayCellAtLocationWithDisplayMode(cell, i, j, Preferences::sharedPreferences()->displayMode());
// The cell is not a title cell and not editable
if (typeAtLocation(i,j) == k_notEditableValueCellType) {
constexpr int precision = Preferences::LargeNumberOfSignificantDigits;
char buffer[PrintFloat::bufferSizeForFloatsWithPrecision(precision)];
char buffer[2*PrintFloat::bufferSizeForFloatsWithPrecision(Preferences::LargeNumberOfSignificantDigits)+3];//(??;??)
// Special case: last row
if (j == numberOfElementsInColumn(i) + 1) {
buffer[0] = 0;
} else {
double x = intervalAtColumn(i)->element(j-1);
PoincareHelpers::ConvertFloatToText<double>(evaluationOfAbscissaAtColumn(x, i), buffer, cellBufferSize(i), precision);
printEvaluationOfAbscissaAtColumn(x, i, buffer, cellBufferSize(i));
}
static_cast<EvenOddBufferTextCell *>(cell)->setText(buffer);
}