[apps/values_controller] Cell types naming for typeAtLocation

This commit is contained in:
Léa Saviot
2019-09-03 15:31:06 +02:00
parent e7958b8287
commit a3b59a585c
4 changed files with 15 additions and 11 deletions

View File

@@ -31,13 +31,13 @@ ValuesController::ValuesController(Responder * parentResponder, InputEventHandle
void ValuesController::willDisplayCellAtLocation(HighlightCell * cell, int i, int j) {
Shared::ValuesController::willDisplayCellAtLocation(cell, i, j);
// The cell is the abscissa title cell:
if (typeAtLocation(i,j) == 0) {
if (typeAtLocation(i,j) == k_abscissaTitleCellType) {
EvenOddMessageTextCell * mytitleCell = (EvenOddMessageTextCell *)cell;
mytitleCell->setMessage(I18n::Message::X);
return;
}
// The cell is a function title cell:
if (typeAtLocation(i,j) == 1) {
if (typeAtLocation(i,j) == k_functionTitleCellType) {
Shared::BufferFunctionTitleCell * myFunctionCell = (Shared::BufferFunctionTitleCell *)cell;
const size_t bufferNameSize = Shared::Function::k_maxNameWithArgumentSize + 1;
char bufferName[bufferNameSize];
@@ -75,7 +75,7 @@ Ion::Storage::Record ValuesController::recordAtColumn(int i) {
}
Ion::Storage::Record ValuesController::recordAtColumn(int i, bool * isDerivative) {
assert(typeAtLocation(i, 0) == 1);
assert(typeAtLocation(i, 0) == k_functionTitleCellType);
int plotTypeIndex = 0;
while (plotTypeIndex < 3 && i >= m_numberOfColumnsForType[plotTypeIndex]) {
i -= m_numberOfColumnsForType[plotTypeIndex++];