mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-25 08:41:01 +01:00
[apps/solver] Do not use symbol context if no solution found
Still replace the functions
This commit is contained in:
@@ -75,7 +75,8 @@ SolutionsController::SolutionsController(Responder * parentResponder, EquationSt
|
||||
m_equationStore(equationStore),
|
||||
m_deltaCell(0.5f, 0.5f),
|
||||
m_delta2Layout(),
|
||||
m_contentView(this)
|
||||
m_contentView(this),
|
||||
m_shouldReplaceFuncionsButNotSymbols(false)
|
||||
{
|
||||
m_delta2Layout = HorizontalLayout::Builder(VerticalOffsetLayout::Builder(CodePointLayout::Builder('2', KDFont::SmallFont), VerticalOffsetLayoutNode::Position::Superscript), LayoutHelper::String("-4ac", 4, KDFont::SmallFont));
|
||||
const char * deltaB = "Δ=b";
|
||||
@@ -108,7 +109,7 @@ void SolutionsController::viewWillAppear() {
|
||||
bool requireWarning = false;
|
||||
if (m_equationStore->type() == EquationStore::Type::Monovariable) {
|
||||
m_contentView.setWarningMessages(I18n::Message::OnlyFirstSolutionsDisplayed0, I18n::Message::OnlyFirstSolutionsDisplayed1);
|
||||
requireWarning = m_equationStore->haveMoreApproximationSolutions(App::app()->localContext());
|
||||
requireWarning = m_equationStore->haveMoreApproximationSolutions(App::app()->localContext(), m_shouldReplaceFuncionsButNotSymbols);
|
||||
} else if (m_equationStore->type() == EquationStore::Type::PolynomialMonovariable && m_equationStore->numberOfSolutions() == 1) {
|
||||
assert(Preferences::sharedPreferences()->complexFormat() == Preferences::ComplexFormat::Real);
|
||||
m_contentView.setWarningMessages(I18n::Message::PolynomeHasNoRealSolution0, I18n::Message::PolynomeHasNoRealSolution1);
|
||||
|
||||
Reference in New Issue
Block a user