[apps] Graph/Sequence: set different cursors for Sequence and Graph

This commit is contained in:
Émilie Feral
2018-01-25 13:49:35 +01:00
committed by EmilieNumworks
parent b38fda1a1e
commit 9cd50d8d9a
8 changed files with 22 additions and 3 deletions

View File

@@ -28,6 +28,7 @@ I18n::Message GraphController::emptyMessage() {
void GraphController::viewWillAppear() {
m_view.drawTangent(false);
FunctionGraphController::viewWillAppear();
selectFunctionWithCursor(indexFunctionSelectedByCursor()); // update the color of the cursor
}
bool GraphController::displayDerivativeInBanner() const {
@@ -38,6 +39,12 @@ void GraphController::setDisplayDerivativeInBanner(bool displayDerivative) {
m_displayDerivativeInBanner = displayDerivative;
}
void GraphController::selectFunctionWithCursor(int functionIndex) {
FunctionGraphController::selectFunctionWithCursor(functionIndex);
CartesianFunction * f = m_functionStore->activeFunctionAtIndex(indexFunctionSelectedByCursor());
m_cursorView.setColor(f->color());
}
BannerView * GraphController::bannerView() {
return &m_bannerView;
}