[apps/calculation] Correct insert in fractions

This commit is contained in:
Romain Goyet
2020-04-08 21:34:53 -04:00
committed by LeaNumworks
parent 884e53f75d
commit a07ab8015e
2 changed files with 5 additions and 1 deletions

View File

@@ -7,7 +7,10 @@ namespace Calculation {
class ExpressionField : public ::ExpressionField {
public:
using ::ExpressionField::ExpressionField;
ExpressionField(Responder * parentResponder, InputEventHandlerDelegate * inputEventHandler, TextFieldDelegate * textFieldDelegate, LayoutFieldDelegate * layoutFieldDelegate) :
::ExpressionField(parentResponder, inputEventHandler, textFieldDelegate, layoutFieldDelegate) {
setLayoutInsertionCursorEvent(Ion::Events::Up);
}
protected:
bool handleEvent(Ion::Events::Event event) override;
};

View File

@@ -25,6 +25,7 @@ public:
bool isEmpty() const;
bool inputViewHeightDidChange();
bool handleEventWithText(const char * text, bool indentation = false, bool forceCursorRightOfText = false);
void setLayoutInsertionCursorEvent(Ion::Events::Event event) { m_layoutField.setInsertionCursorEvent(event); }
/* View */
int numberOfSubviews() const override { return 1; }