[aps/solver] Reset the solution selection when leaving the view

Solve an equation that has solutions, select a solution, then go back
and change the equation. WHen you go to the solutions, the previous
solution is still selected, which is a little weird
This commit is contained in:
Léa Saviot
2020-01-31 14:56:21 +01:00
parent fdb1417a02
commit 9200e6062d
5 changed files with 17 additions and 11 deletions

View File

@@ -121,9 +121,11 @@ void SolutionsController::viewWillAppear() {
}
m_contentView.setWarning(requireWarning);
m_contentView.selectableTableView()->reloadData();
if (selectedRow() < 0) {
selectCellAtLocation(0, 0);
}
selectCellAtLocation(0, 0);
}
void SolutionsController::viewDidDisappear() {
selectCellAtLocation(-1, -1);
}
void SolutionsController::didEnterResponderChain(Responder * previousFirstResponder) {