mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps] Use a forgotten method on selectable table view
Change-Id: I6b934ac0d2587565c6b94d5130d158b621c1e187
This commit is contained in:
@@ -42,7 +42,7 @@ void CalculationSelectableTableView::scrollToSubviewOfTypeOfCellAtLocation(Histo
|
||||
/* As we scroll, the selected calculation does not use the same history view
|
||||
* cell, thus, we want to deselect the previous used history view cell. */
|
||||
if (selectedRow() >= 0) {
|
||||
HighlightCell * previousCell = cellAtLocation(selectedColumn(), selectedRow());
|
||||
HighlightCell * previousCell = selectedCell();
|
||||
previousCell->setHighlighted(false);
|
||||
}
|
||||
/* Main part of the scroll */
|
||||
|
||||
@@ -43,7 +43,7 @@ void CalculationController::didBecomeFirstResponder() {
|
||||
if (selectableTableView()->selectedRow() == -1) {
|
||||
selectableTableView()->selectCellAtLocation(1, 0);
|
||||
} else {
|
||||
selectableTableView()->selectCellAtLocation(selectableTableView()->selectedColumn(), selectableTableView()->selectedRow());
|
||||
selectableTableView()->selectedCell();
|
||||
}
|
||||
TabTableController::didBecomeFirstResponder();
|
||||
}
|
||||
@@ -64,7 +64,7 @@ void CalculationController::tableViewDidChangeSelection(SelectableTableView * t,
|
||||
}
|
||||
}
|
||||
if (t->selectedColumn() == 1 && t->selectedRow() >= 0 && t->selectedRow() < 6) {
|
||||
EvenOddDoubleBufferTextCell * myCell = (EvenOddDoubleBufferTextCell *)t->cellAtLocation(t->selectedColumn(), t->selectedRow());
|
||||
EvenOddDoubleBufferTextCell * myCell = (EvenOddDoubleBufferTextCell *)t->selectedCell();
|
||||
bool firstSubCellSelected = true;
|
||||
if (previousSelectedCellX == 1 && previousSelectedCellY >= 0 && previousSelectedCellY < 6) {
|
||||
EvenOddDoubleBufferTextCell * myPreviousCell = (EvenOddDoubleBufferTextCell *)t->cellAtLocation(previousSelectedCellX, previousSelectedCellY);
|
||||
|
||||
@@ -76,7 +76,7 @@ bool SubController::handleEvent(Ion::Events::Event event) {
|
||||
if (m_selectableTableView.selectedRow() == 1) {
|
||||
return false;
|
||||
}
|
||||
MessageTableCellWithBuffer * myCell = (MessageTableCellWithBuffer *)m_selectableTableView.cellAtLocation(m_selectableTableView.selectedColumn(), m_selectableTableView.selectedRow());
|
||||
MessageTableCellWithBuffer * myCell = (MessageTableCellWithBuffer *)m_selectableTableView.selectedCell();
|
||||
if (strcmp(myCell->accessoryText(), Ion::patchLevel()) == 0) {
|
||||
myCell->setAccessoryText(Ion::softwareVersion());
|
||||
return true;
|
||||
|
||||
@@ -54,7 +54,7 @@ void EditableCellTableViewController::tableViewDidChangeSelection(SelectableTabl
|
||||
}
|
||||
}
|
||||
if (cellAtLocationIsEditable(t->selectedColumn(), t->selectedRow())) {
|
||||
EvenOddEditableTextCell * myCell = (EvenOddEditableTextCell *)t->cellAtLocation(t->selectedColumn(), t->selectedRow());
|
||||
EvenOddEditableTextCell * myCell = (EvenOddEditableTextCell *)t->selectedCell();
|
||||
app()->setFirstResponder(myCell);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,8 +129,7 @@ bool FloatParameterController::textFieldDidFinishEditing(TextField * textField,
|
||||
if (!setParameterAtIndex(selectableTableView()->selectedRow(), floatBody)) {
|
||||
return false;
|
||||
}
|
||||
willDisplayCellForIndex(selectableTableView()->cellAtLocation(selectableTableView()->selectedColumn(),
|
||||
selectableTableView()->selectedRow()), activeCell());
|
||||
willDisplayCellForIndex(selectableTableView()->selectedCell(), activeCell());
|
||||
selectableTableView()->reloadData();
|
||||
if (event == Ion::Events::EXE || event == Ion::Events::OK) {
|
||||
selectableTableView()->selectCellAtLocation(selectableTableView()->selectedColumn(), selectableTableView()->selectedRow()+1);
|
||||
@@ -157,12 +156,12 @@ void FloatParameterController::tableViewDidChangeSelection(SelectableTableView *
|
||||
myCell->setEditing(false);
|
||||
}
|
||||
if (t->selectedRow() == numberOfRows()-1) {
|
||||
Button * myNewCell = (Button *)t->cellAtLocation(t->selectedColumn(), t->selectedRow());
|
||||
Button * myNewCell = (Button *)t->selectedCell();
|
||||
app()->setFirstResponder(myNewCell);
|
||||
return;
|
||||
}
|
||||
if (t->selectedRow() >= 0) {
|
||||
MessageTableCellWithEditableText * myNewCell = (MessageTableCellWithEditableText *)t->cellAtLocation(t->selectedColumn(), t->selectedRow());
|
||||
MessageTableCellWithEditableText * myNewCell = (MessageTableCellWithEditableText *)t->selectedCell();
|
||||
app()->setFirstResponder(myNewCell);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ void RangeParameterController::tableViewDidChangeSelection(SelectableTableView *
|
||||
}
|
||||
}
|
||||
if (t->selectedRow() == numberOfRows()-1) {
|
||||
Button * myNewCell = (Button *)t->cellAtLocation(t->selectedColumn(), t->selectedRow());
|
||||
Button * myNewCell = (Button *)t->selectedCell();
|
||||
app()->setFirstResponder(myNewCell);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user