mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[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:
committed by
Émilie Feral
parent
5b6fca8f72
commit
e7add02912
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user