[apps] Probability: fix scrolling in calculation cells

This commit is contained in:
Émilie Feral
2018-01-30 14:12:28 +01:00
committed by EmilieNumworks
parent 5d8256435e
commit 2a207e59ac
2 changed files with 3 additions and 1 deletions

View File

@@ -211,6 +211,8 @@ bool CalculationController::textFieldDidHandleEvent(::TextField * textField, Ion
* the first responder. */
bool shouldUpdateFirstResponder = app()->firstResponder() == textField;
m_selectableTableView.reloadData(shouldUpdateFirstResponder);
// The textField frame might have increased which forces to reload the textField scroll
textField->scrollToCursor();
}
return returnValue;
}

View File

@@ -35,6 +35,7 @@ public:
constexpr static int maxBufferSize() {
return ContentView::k_maxBufferSize;
}
void scrollToCursor();
protected:
class ContentView : public View {
public:
@@ -95,7 +96,6 @@ private:
bool privateHandleEvent(Ion::Events::Event event);
void deleteCharPrecedingCursor();
bool deleteEndOfLine();
void scrollToCursor();
bool m_hasTwoBuffers;
TextFieldDelegate * m_delegate;
};