[solver] Ignore empty equation when resolving systems

This commit is contained in:
Émilie Feral
2018-06-06 15:08:24 +02:00
parent ac9da8d559
commit 2d580faf51
13 changed files with 51 additions and 50 deletions

View File

@@ -111,7 +111,7 @@ void SolutionsController::viewWillAppear() {
/* AlternateEmptyRowDelegate */
bool SolutionsController::isEmpty() const {
if (m_equationStore->numberOfModels() == 0 || m_equationStore->numberOfSolutions() == 0 || m_equationStore->numberOfSolutions() == INT_MAX) {
if (m_equationStore->numberOfDefinedModels() == 0 || m_equationStore->numberOfSolutions() == 0 || m_equationStore->numberOfSolutions() == INT_MAX) {
return true;
}
return false;
@@ -124,7 +124,7 @@ I18n::Message SolutionsController::emptyMessage() {
if (m_equationStore->type() == EquationStore::Type::Monovariable) {
return I18n::Message::NoSolutionInterval;
}
if (m_equationStore->numberOfModels() <= 1) {
if (m_equationStore->numberOfDefinedModels() <= 1) {
return I18n::Message::NoSolutionEquation;
}
return I18n::Message::NoSolutionSystem;