[apps][escher] Add methods 'handleEventWithText' in TextField and

TextArea to fix bug in probability (adding a toolbox text from the
calculations controller)
This commit is contained in:
Émilie Feral
2018-02-19 11:18:58 +01:00
committed by EmilieNumworks
parent 7fcf77ce23
commit 576caa039f
24 changed files with 144 additions and 147 deletions

View File

@@ -336,7 +336,7 @@ bool MenuController::textFieldDidAbortEditing(TextField * textField, const char
return true;
}
bool MenuController::textFieldDidHandleEvent(TextField * textField, Ion::Events::Event event, bool returnValue, bool textHasChanged) {
bool MenuController::textFieldDidHandleEvent(TextField * textField, bool returnValue, bool textHasChanged) {
int scriptExtensionLength = strlen(ScriptStore::k_scriptExtension);
if (textField->isEditing() && textField->cursorLocation() > textField->draftTextLength() - scriptExtensionLength) {
textField->setCursorLocation(textField->draftTextLength() - scriptExtensionLength);