[apps/graph] Handle navigation on hidden cells

This commit is contained in:
Léa Saviot
2019-09-05 10:49:43 +02:00
parent af3d1456e0
commit 58ac80783a
4 changed files with 15 additions and 3 deletions

View File

@@ -29,6 +29,7 @@ ValuesController::ValuesController(Responder * parentResponder, InputEventHandle
m_functionTitleCells[i].setFont(KDFont::SmallFont);
}
setupAbscissaCellsAndTitleCells(inputEventHandlerDelegate);
m_selectableTableView.setDelegate(this);
}
void ValuesController::willDisplayCellAtLocation(HighlightCell * cell, int i, int j) {
@@ -101,6 +102,15 @@ I18n::Message ValuesController::emptyMessage() {
return I18n::Message::NoActivatedFunction;
}
void ValuesController::tableViewDidChangeSelection(SelectableTableView * t, int previousSelectedCellX, int previousSelectedCellY, bool withinTemporarySelection) {
const int i = selectedColumn();
const int j = selectedRow();
const int numberOfElementsInCol = numberOfElementsInColumn(i);
if (j > 1 + numberOfElementsInCol) {
selectCellAtLocation(i, 1 + numberOfElementsInCol);
}
}
Ion::Storage::Record ValuesController::recordAtColumn(int i) {
bool isDerivative = false;
return recordAtColumn(i, &isDerivative);