[apps/shared] Deselect table in float parameter controller when

disappearing

Change-Id: I59baf6b9d578b9d5045287f7c9ba65ff53abbda9
This commit is contained in:
Émilie Feral
2017-03-23 11:28:42 +01:00
parent fa2ee9e624
commit 5e7bfc795a
2 changed files with 6 additions and 1 deletions

View File

@@ -111,6 +111,9 @@ int ParametersController::numberOfRows() {
void ParametersController::willDisplayCellForIndex(HighlightCell * cell, int index) {
if (index == numberOfRows()-1) {
if (m_selectableTableView.selectedRow() != numberOfRows()-1) {
cell->setHighlighted(false);
}
return;
}
MessageTableCellWithEditableText * myCell = (MessageTableCellWithEditableText *) cell;

View File

@@ -71,7 +71,9 @@ void RangeParameterController::tableViewDidChangeSelection(SelectableTableView *
if (previousSelectedCellY < numberOfRows()-1 && previousSelectedCellY >= 0 && previousSelectedCellY !=2) {
MessageTableCellWithEditableText * myCell = (MessageTableCellWithEditableText *)t->cellAtLocation(previousSelectedCellX, previousSelectedCellY);
myCell->setEditing(false);
app()->setFirstResponder(t);
if (t->selectedRow() >= 0) {
app()->setFirstResponder(t);
}
}
if (t->selectedRow() == numberOfRows()-1) {
Button * myNewCell = (Button *)t->cellAtLocation(t->selectedColumn(), t->selectedRow());