mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 16:57:31 +01:00
[apps/calculation] Correct bug: set the right cell first responder
Change-Id: Iafee70a6a3bcf59c60efb4575b044b19fa5c1db4
This commit is contained in:
@@ -61,8 +61,9 @@ bool HistoryController::handleEvent(Ion::Events::Event event) {
|
||||
}
|
||||
|
||||
void HistoryController::tableViewDidChangeSelection(SelectableTableView * t) {
|
||||
m_calculationHistory[t->selectedRow()].setParentResponder(t);
|
||||
app()->setFirstResponder(&m_calculationHistory[t->selectedRow()]);
|
||||
HistoryViewCell * selectedCell = (HistoryViewCell *)(t->selectedCell());
|
||||
selectedCell->setParentResponder(t);
|
||||
app()->setFirstResponder(selectedCell);
|
||||
}
|
||||
|
||||
int HistoryController::numberOfRows() {
|
||||
|
||||
@@ -24,6 +24,7 @@ public:
|
||||
virtual void didBecomeFirstResponder() override;
|
||||
void deselectTable();
|
||||
bool selectCellAtLocation(int i, int j);
|
||||
TableViewCell * selectedCell();
|
||||
private:
|
||||
int m_selectedCellX;
|
||||
int m_selectedCellY;
|
||||
|
||||
@@ -55,6 +55,10 @@ bool SelectableTableView::selectCellAtLocation(int i, int j) {
|
||||
return true;
|
||||
}
|
||||
|
||||
TableViewCell * SelectableTableView::selectedCell() {
|
||||
return cellAtLocation(m_selectedCellX, m_selectedCellY);
|
||||
}
|
||||
|
||||
bool SelectableTableView::handleEvent(Ion::Events::Event event) {
|
||||
switch (event) {
|
||||
case Ion::Events::Event::DOWN_ARROW:
|
||||
|
||||
Reference in New Issue
Block a user