mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-24 08:10:50 +01:00
[apps/calculation] Handle OK event in calculation history.
Change-Id: I3e4c309a3bc031476eea0d64d433b535b1220a8f
This commit is contained in:
@@ -85,10 +85,16 @@ const char * EditExpressionController::textBody() {
|
||||
}
|
||||
|
||||
void EditExpressionController::insertTextBody(const char * text) {
|
||||
TextField * tf = ((ContentView *)view())->textField();
|
||||
tf->setEditing(true, false);
|
||||
tf->insertTextAtLocation(text, tf->cursorLocation());
|
||||
tf->setCursorLocation(tf->cursorLocation() + strlen(text));
|
||||
if (((ContentView *)view())->editionIsInTextField()) {
|
||||
TextField * tf = ((ContentView *)view())->textField();
|
||||
tf->setEditing(true, false);
|
||||
tf->insertTextAtLocation(text, tf->cursorLocation());
|
||||
tf->setCursorLocation(tf->cursorLocation() + strlen(text));
|
||||
return;
|
||||
}
|
||||
EditableExpressionView * editableExpressionView = ((ContentView *)view())->editableExpressionView();
|
||||
editableExpressionView->setEditing(true);
|
||||
editableExpressionView->insertLayoutFromTextAtCursor(text);
|
||||
}
|
||||
|
||||
bool EditExpressionController::handleEvent(Ion::Events::Event event) {
|
||||
|
||||
Reference in New Issue
Block a user