From 251c4d01afe1c3447b3e2d2c330307aa09cfed30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Saviot?= Date: Fri, 19 Jan 2018 16:42:05 +0100 Subject: [PATCH] [apps/sequence] Fix math_toolbox wrong functions calls. Change-Id: I0b7871e87ea64ef9fbd008d9fb3e6d4cce2e97ca --- apps/math_toolbox.h | 2 +- apps/sequence/list/sequence_toolbox.cpp | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/math_toolbox.h b/apps/math_toolbox.h index 2f607863c..02be3effa 100644 --- a/apps/math_toolbox.h +++ b/apps/math_toolbox.h @@ -20,8 +20,8 @@ protected: MessageTableCellWithChevron* nodeCellAtIndex(int index) override; int maxNumberOfDisplayedRows() override; constexpr static int k_maxNumberOfDisplayedRows = 6; // = 240/40 -private: Action m_action; +private: MessageTableCellWithMessage m_leafCells[k_maxNumberOfDisplayedRows]; MessageTableCellWithChevron m_nodeCells[k_maxNumberOfDisplayedRows]; }; diff --git a/apps/sequence/list/sequence_toolbox.cpp b/apps/sequence/list/sequence_toolbox.cpp index fddc7d061..f4346311d 100644 --- a/apps/sequence/list/sequence_toolbox.cpp +++ b/apps/sequence/list/sequence_toolbox.cpp @@ -114,9 +114,8 @@ void SequenceToolbox::setExtraCells(const char * sequenceName, int recurrenceDep bool SequenceToolbox::selectAddedCell(int selectedRow){ int bufferSize = 10; char buffer[bufferSize]; - int currentChar = m_addedCellLayout[selectedRow]->writeTextInBuffer(buffer, bufferSize); - textFieldSender()->insertTextAtLocation(buffer, textFieldSender()->cursorLocation()); - textFieldSender()->setCursorLocation(textFieldSender()->cursorLocation()+currentChar); + m_addedCellLayout[selectedRow]->writeTextInBuffer(buffer, bufferSize); + m_action(sender(), buffer); app()->dismissModalViewController(); return true; }