diff --git a/apps/graph/list/text_field_function_title_cell.cpp b/apps/graph/list/text_field_function_title_cell.cpp index 03290868b..80f0b4f57 100644 --- a/apps/graph/list/text_field_function_title_cell.cpp +++ b/apps/graph/list/text_field_function_title_cell.cpp @@ -7,7 +7,7 @@ namespace Graph { TextFieldFunctionTitleCell::TextFieldFunctionTitleCell(StorageListController * listController, Orientation orientation, KDText::FontSize size) : Shared::FunctionTitleCell(orientation), Responder(listController), - m_textField(this, m_textFieldBuffer, m_textFieldBuffer, k_textFieldBufferSize, listController, false, size, 0.5f, 0.5f) + m_textField(Shared::StorageFunction::k_parenthesedArgumentLength, this, m_textFieldBuffer, m_textFieldBuffer, k_textFieldBufferSize, listController, false, size, 0.5f, 0.5f) {} void TextFieldFunctionTitleCell::setHighlighted(bool highlight) { @@ -20,7 +20,6 @@ void TextFieldFunctionTitleCell::setEditing(bool editing) { const char * previousText = m_textField.text(); m_textField.setEditing(true, false); m_textField.setText(previousText); - m_textField.setCursorLocation(strlen(previousText) - strlen("(x)")); } void TextFieldFunctionTitleCell::setEven(bool even) { diff --git a/apps/graph/list/text_field_function_title_cell.h b/apps/graph/list/text_field_function_title_cell.h index 2d67692c7..50d8599b0 100644 --- a/apps/graph/list/text_field_function_title_cell.h +++ b/apps/graph/list/text_field_function_title_cell.h @@ -2,6 +2,7 @@ #define GRAPH_LIST_TEXT_FIELD_FUNCTION_TITLE_CELL_H #include +#include namespace Graph { @@ -29,7 +30,7 @@ protected: KDRect textFieldFrame() const; private: constexpr static int k_textFieldBufferSize = TextField::maxBufferSize(); - TextField m_textField; + Shared::TextFieldWithExtension m_textField; char m_textFieldBuffer[k_textFieldBufferSize]; }; diff --git a/apps/shared/text_field_with_extension.h b/apps/shared/text_field_with_extension.h index 18a229de0..cddbed988 100644 --- a/apps/shared/text_field_with_extension.h +++ b/apps/shared/text_field_with_extension.h @@ -12,7 +12,7 @@ public: char * textBuffer, char * draftTextBuffer, size_t textBufferSize, - TextFieldDelegate * delegate = nullptr, + ::TextFieldDelegate * delegate = nullptr, bool hasTwoBuffers = true, KDText::FontSize size = KDText::FontSize::Large, float horizontalAlignment = 0.0f,