mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-19 13:50:28 +01:00
[escher] Fixed TextField bug.
The Statistics apps crashed when navigating the Data table. -> Check that the textfield is editing before calling textFieldShouldFinishEditing. -> Changed textLength() to draftTextLength(). Change-Id: Id373a7cd50438303f470abc5bcee7a795c33926a
This commit is contained in:
@@ -83,7 +83,7 @@ void EditExpressionController::didBecomeFirstResponder() {
|
||||
}
|
||||
|
||||
bool EditExpressionController::textFieldDidReceiveEvent(::TextField * textField, Ion::Events::Event event) {
|
||||
if (textField->textFieldShouldFinishEditing(event) && textField->isEditing() && strlen(textField->text()) == 0 && m_calculationStore->numberOfCalculations() > 0) {
|
||||
if (textField->isEditing() && textField->textFieldShouldFinishEditing(event) && textField->draftTextLength() == 0 && m_calculationStore->numberOfCalculations() > 0) {
|
||||
App * calculationApp = (App *)app();
|
||||
const char * lastTextBody = m_calculationStore->calculationAtIndex(m_calculationStore->numberOfCalculations()-1)->inputText();
|
||||
m_calculationStore->push(lastTextBody, calculationApp->localContext());
|
||||
|
||||
Reference in New Issue
Block a user