[apps/regression/graph] Fix roundCursorView drawing glitch

Scenario:
f(x)=cos(x)
CalculateZeroes -> drawing glitch
Right, Back -> drawing glitch
This commit is contained in:
Léa Saviot
2019-10-03 17:01:24 +02:00
committed by EmilieNumworks
parent 0b5374e4c2
commit 19921ec125
2 changed files with 6 additions and 0 deletions

View File

@@ -31,6 +31,9 @@ I18n::Message GraphController::emptyMessage() {
void GraphController::viewWillAppear() {
m_view.drawTangent(false);
#ifdef GRAPH_CURSOR_SPEEDUP
m_cursorView.resetMemoization();
#endif
m_view.setCursorView(&m_cursorView);
FunctionGraphController::viewWillAppear();
selectFunctionWithCursor(indexFunctionSelectedByCursor());

View File

@@ -45,6 +45,9 @@ I18n::Message GraphController::emptyMessage() {
}
void GraphController::viewWillAppear() {
#ifdef GRAPH_CURSOR_SPEEDUP
m_roundCursorView.resetMemoization();
#endif
/* At this point, some series might have been removed from the model. We need
* to reinitialize the selected series index if the current selection is
* either null (right after construction) or refering a removed series. */