mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-29 11:39:58 +02:00
[apps/calculation] Invalid calculation height memoization when leaving
the app. Fix wrong memoization: in calculation app input '[[1+i, 2][3,4]]', change the complex format to Polar, go back to the calculation app --> the calculation height was no recomputed despite the fact that the approximation output changed.
This commit is contained in:
@@ -33,6 +33,13 @@ 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). */
|
||||
m_height = -1;
|
||||
m_expandedHeight = -1;
|
||||
}
|
||||
|
||||
const char * Calculation::approximateOutputText() const {
|
||||
const char * exactOutput = exactOutputText();
|
||||
return exactOutput + strlen(exactOutput) + 1;
|
||||
|
||||
Reference in New Issue
Block a user