mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-20 14:20:39 +01:00
[apps] Factorize scrolling speed for long repetition
Change-Id: I5fcfaf04e418942664641c4b1cd044cda7f5aebb
This commit is contained in:
committed by
Émilie Feral
parent
241a217f58
commit
b60c67ff88
@@ -219,7 +219,7 @@ void GraphController::reloadBannerView() {
|
||||
m_bannerView.reload();
|
||||
}
|
||||
|
||||
bool GraphController::moveCursorHorizontally(int direction, bool fast) {
|
||||
bool GraphController::moveCursorHorizontally(int direction, int scrollSpeed) {
|
||||
double x;
|
||||
double y;
|
||||
if (*m_selectedDotIndex >= 0) {
|
||||
@@ -235,10 +235,7 @@ bool GraphController::moveCursorHorizontally(int direction, bool fast) {
|
||||
}
|
||||
*m_selectedDotIndex = dotSelected;
|
||||
} else {
|
||||
double step = direction * m_store->xGridUnit()/k_numberOfCursorStepsInGradUnit;
|
||||
if (fast) {
|
||||
step *= 5.0;
|
||||
}
|
||||
double step = direction * scrollSpeed * m_store->xGridUnit()/k_numberOfCursorStepsInGradUnit;
|
||||
x = m_cursor->x() + step;
|
||||
y = yValue(*m_selectedSeriesIndex, x, globalContext());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user