[apps] Remove FunctionGraphController::cursorView() virtual method

It was implemented by the Graph and Sequence GraphController derived
classes and was used
  1) in FunctionGraphController::viewWillAppear to set the cursorView
specific to each derived class,
  2) in FunctionGraphController::cursor/displayBottomMarginRatio()
methods.

Instead
  1) the viewWillAppear method of each derived classes sets its
cursorView itself
  2) one may already get the cursorView through curveView().
This commit is contained in:
Ruben Dashyan
2019-04-26 10:27:57 +02:00
committed by Émilie Feral
parent 5b6fca8f72
commit e7add02912
6 changed files with 10 additions and 11 deletions

View File

@@ -28,7 +28,6 @@ ViewController * FunctionGraphController::initialisationParameterController() {
}
void FunctionGraphController::viewWillAppear() {
functionGraphView()->setCursorView(cursorView());
functionGraphView()->setBannerView(bannerView());
functionGraphView()->setAreaHighlight(NAN,NAN);
@@ -57,7 +56,7 @@ void FunctionGraphController::selectFunctionWithCursor(int functionIndex) {
}
float FunctionGraphController::cursorBottomMarginRatio() {
return (cursorView()->minimalSizeForOptimalDisplay().height()/2+estimatedBannerHeight())/k_viewHeight;
return (curveView()->cursorView()->minimalSizeForOptimalDisplay().height()/2+estimatedBannerHeight())/k_viewHeight;
}
void FunctionGraphController::reloadBannerView() {
@@ -69,7 +68,7 @@ void FunctionGraphController::reloadBannerView() {
}
float FunctionGraphController::displayBottomMarginRatio() {
return (cursorView()->minimalSizeForOptimalDisplay().height() + 2 + estimatedBannerHeight()) / k_viewHeight;
return (curveView()->cursorView()->minimalSizeForOptimalDisplay().height() + 2 + estimatedBannerHeight()) / k_viewHeight;
}
float FunctionGraphController::estimatedBannerHeight() const {