mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-29 19:49:58 +02:00
[apps/sequence] Draw only visible dots when range is too big.
Change-Id: I8624fa3063d1787049510f4063f562d900f002c5
This commit is contained in:
@@ -48,8 +48,13 @@ bool GraphController::moveCursorHorizontally(int direction) {
|
||||
if (direction < 0 && xCursorPosition <= 0) {
|
||||
return false;
|
||||
}
|
||||
float x = direction > 0 ? xCursorPosition + 1.0f :
|
||||
xCursorPosition - 1.0f;
|
||||
float step = ceilf((interactiveCurveViewRange()->xMax()-interactiveCurveViewRange()->xMin())/GraphView::k_precision);
|
||||
step = step < 1.0f ? 1.0f : step;
|
||||
float x = direction > 0 ? xCursorPosition + step:
|
||||
xCursorPosition - step;
|
||||
if (x < 0.0f) {
|
||||
return false;
|
||||
}
|
||||
Sequence * s = m_sequenceStore->activeFunctionAtIndex(m_indexFunctionSelectedByCursor);
|
||||
TextFieldDelegateApp * myApp = (TextFieldDelegateApp *)app();
|
||||
float y = s->evaluateAtAbscissa(x, myApp->localContext());
|
||||
|
||||
Reference in New Issue
Block a user