[apps/graph] Faster curve navigation after some time

If the user presses the LEft/Right keys for a long time, the cursor will
move faster.
This commit is contained in:
Léa Saviot
2019-09-24 14:38:39 +02:00
parent b9bc9008ac
commit 1434158bee
14 changed files with 20 additions and 21 deletions

View File

@@ -70,7 +70,7 @@ bool CalculationGraphController::handleEnter() {
return true;
}
bool CalculationGraphController::moveCursorHorizontally(int direction) {
bool CalculationGraphController::moveCursorHorizontally(int direction, bool fast) {
Coordinate2D<double> newPointOfInterest = computeNewPointOfInterestFromAbscissa(m_cursor->x(), direction);
if (std::isnan(newPointOfInterest.x1())) {
return false;