[apps/*/expression_model_list_controller] Refactor modelStore()

Its return type is covariant. Get the ExpressionModelStore from the App.
This commit is contained in:
Ruben Dashyan
2019-09-06 17:21:31 +02:00
committed by LeaNumworks
parent e80aaa649d
commit 413397652c
9 changed files with 26 additions and 14 deletions

View File

@@ -10,7 +10,6 @@ namespace Solver {
ListController::ListController(Responder * parentResponder, EquationStore * equationStore, ButtonRowController * footer) :
ExpressionModelListController(parentResponder, I18n::Message::AddEquation),
ButtonRowDelegate(nullptr, footer),
m_equationStore(equationStore),
m_equationListView(this),
m_expressionCells{},
m_resolveButton(this, equationStore->numberOfDefinedModels() > 1 ? I18n::Message::ResolveSystem : I18n::Message::ResolveEquation, Invocation([](void * context, void * sender) {
@@ -221,6 +220,10 @@ void ListController::reloadBrace() {
m_equationListView.setBraceStyle(braceStyle);
}
EquationStore * ListController::modelStore() {
return App::app()->equationStore();
}
SelectableTableView * ListController::selectableTableView() {
return m_equationListView.selectableTableView();
}