[apps] Get rid of DynamicViewController in FloatParameterController

This commit is contained in:
Émilie Feral
2018-09-11 10:16:36 +02:00
parent 5cb4258af6
commit 6d9f0c0f0b
15 changed files with 89 additions and 227 deletions

View File

@@ -8,8 +8,7 @@ GoToParameterController::GoToParameterController(Responder * parentResponder, In
FloatParameterController(parentResponder),
m_cursor(cursor),
m_graphRange(graphRange),
m_abscisseCell(nullptr),
m_abscissaSymbol(symbol)
m_abscisseCell(&m_selectableTableView, this, m_draftTextBuffer, symbol)
{
}
@@ -19,7 +18,7 @@ int GoToParameterController::numberOfRows() {
HighlightCell * GoToParameterController::reusableParameterCell(int index, int type) {
assert(index == 0);
return m_abscisseCell;
return &m_abscisseCell;
}
int GoToParameterController::reusableParameterCellCount(int type) {
@@ -40,16 +39,4 @@ void GoToParameterController::buttonAction() {
stack->pop();
}
View * GoToParameterController::loadView() {
SelectableTableView * tableView = (SelectableTableView *)FloatParameterController::loadView();
m_abscisseCell = new MessageTableCellWithEditableText(tableView, this, m_draftTextBuffer, m_abscissaSymbol);
return tableView;
}
void GoToParameterController::unloadView(View * view) {
delete m_abscisseCell;
m_abscisseCell = nullptr;
FloatParameterController::unloadView(view);
}
}