mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[apps/calculation] When leaving calculation app, do not invalid
calculation height memoization. They're computed from the layouts which don't depend on the complex format (or any other settings parameters which could have changed).
This commit is contained in:
committed by
LeaNumworks
parent
708477dece
commit
c2db00cc88
@@ -38,12 +38,6 @@ Calculation * Calculation::next() const {
|
||||
return reinterpret_cast<Calculation *>(const_cast<char *>(result));
|
||||
}
|
||||
|
||||
void Calculation::tidy() {
|
||||
/* Reset height memoization (the complex format could have changed when
|
||||
* re-entering Calculation app which would impact the heights). */
|
||||
resetHeightMemoization();
|
||||
}
|
||||
|
||||
const char * Calculation::approximateOutputText(NumberOfSignificantDigits numberOfSignificantDigits) const {
|
||||
const char * exactOutput = exactOutputText();
|
||||
const char * approximateOutputTextWithMaxNumberOfDigits = exactOutput + strlen(exactOutput) + 1;
|
||||
@@ -219,6 +213,7 @@ Calculation::EqualSign Calculation::exactAndApproximateDisplayedOutputsAreEqual(
|
||||
Poincare::ExceptionCheckpoint ecp;
|
||||
if (ExceptionRun(ecp)) {
|
||||
Preferences * preferences = Preferences::sharedPreferences();
|
||||
// TODO: complex format should not be needed here (as it is not used to create layouts)
|
||||
Preferences::ComplexFormat complexFormat = Expression::UpdatedComplexFormatWithTextInput(preferences->complexFormat(), m_inputText);
|
||||
m_equalSign = Expression::ParsedExpressionsAreEqual(exactOutputText(), approximateOutputText(NumberOfSignificantDigits::UserDefined), context, complexFormat, preferences->angleUnit()) ? EqualSign::Equal : EqualSign::Approximation;
|
||||
return m_equalSign;
|
||||
|
||||
Reference in New Issue
Block a user