[escher] Select tab when clicking on back: implement

willExitResponderChain for tab root controllers

Change-Id: Ie0399d24708e326d2284013a925792b36e6b629b
This commit is contained in:
Émilie Feral
2017-03-02 12:14:41 +01:00
committed by Romain Goyet
parent 1be0dc8b67
commit 9478fb2f26
21 changed files with 140 additions and 12 deletions

View File

@@ -54,10 +54,14 @@ bool FloatParameterController::textFieldDidFinishEditing(TextField * textField,
}
void FloatParameterController::tableViewDidChangeSelection(SelectableTableView * t, int previousSelectedCellX, int previousSelectedCellY) {
PointerTableCellWithEditableText * myCell = (PointerTableCellWithEditableText *)t->cellAtLocation(previousSelectedCellX, previousSelectedCellY);
myCell->setEditing(false);
PointerTableCellWithEditableText * myNewCell = (PointerTableCellWithEditableText *)t->cellAtLocation(t->selectedColumn(), t->selectedRow());
app()->setFirstResponder(myNewCell);
if (previousSelectedCellY >= 0) {
PointerTableCellWithEditableText * myCell = (PointerTableCellWithEditableText *)t->cellAtLocation(previousSelectedCellX, previousSelectedCellY);
myCell->setEditing(false);
}
if (t->selectedRow() >= 0) {
PointerTableCellWithEditableText * myNewCell = (PointerTableCellWithEditableText *)t->cellAtLocation(t->selectedColumn(), t->selectedRow());
app()->setFirstResponder(myNewCell);
}
}
TextFieldDelegateApp * FloatParameterController::textFieldDelegateApp() {