[escher] TextField and LayoutField handle move events while in editing

mode to avoid leaving unexpectedly edition mode
This commit is contained in:
Émilie Feral
2018-10-24 14:20:28 +02:00
parent 01ad885045
commit 7e7c77a0e8
7 changed files with 67 additions and 51 deletions

View File

@@ -56,7 +56,7 @@ bool SumGraphController::handleEvent(Ion::Events::Event event) {
if ((int)m_step > 1 && event != Ion::Events::OK && event != Ion::Events::EXE && event != Ion::Events::Back) {
return false;
}
if (event == Ion::Events::Left && !m_legendView.textField()->isEditing()) {
if (event == Ion::Events::Left) {
if ((int)m_step > 0 && m_startSum >= m_cursor->x()) {
return false;
}
@@ -66,7 +66,7 @@ bool SumGraphController::handleEvent(Ion::Events::Event event) {
}
return false;
}
if (event == Ion::Events::Right && !m_legendView.textField()->isEditing()) {
if (event == Ion::Events::Right) {
if (moveCursorHorizontallyToPosition(cursorNextStep(m_cursor->x(), 1))) {
m_graphView->reload();
return true;