[apps/sequence] Cleaner resolution and comments

Change-Id: I3e4919f9f76ede2a81a672f21060adda2b98f1bd
This commit is contained in:
Émilie Feral
2017-04-18 10:52:00 +02:00
parent 5afd182164
commit 8a9df36a35
5 changed files with 17 additions and 9 deletions

View File

@@ -48,6 +48,9 @@ bool GraphController::moveCursorHorizontally(int direction) {
if (direction < 0 && xCursorPosition <= 0) {
return false;
}
/* The cursor moves by step of at minimum 1. If the windowRange is to large
* compared to the resolution, the cursor takes bigger round step to cross
* the window in approximatively resolution steps. */
float step = ceilf((interactiveCurveViewRange()->xMax()-interactiveCurveViewRange()->xMin())/m_view.resolution());
step = step < 1.0f ? 1.0f : step;
float x = direction > 0 ? xCursorPosition + step: