From 12365aed5916ac8fc26b5c6a8363274e56874586 Mon Sep 17 00:00:00 2001 From: EvanR Date: Tue, 22 Sep 2009 14:06:25 -0400 Subject: [PATCH] Fixed stop-scroll functionality. Now it scrolls to the play position, which may not be zero. --- src/arranger.h | 8 +++++--- src/uihelper.cpp | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/arranger.h b/src/arranger.h index 1069ccb..7fcd858 100644 --- a/src/arranger.h +++ b/src/arranger.h @@ -86,9 +86,6 @@ class Arranger : public fltk::Widget { int over_rhandle(seqpat* s); int over_lhandle(seqpat* s); - int tick2xpix(int tick); - int xpix2tick(int xpix); - int quantize(int xpix); int delete_flag; @@ -158,6 +155,11 @@ class Arranger : public fltk::Widget { void scrollTo(int X, int Y); + + int tick2xpix(int tick); + int xpix2tick(int xpix); + int quantize(int xpix); + }; #endif diff --git a/src/uihelper.cpp b/src/uihelper.cpp index 09bb134..0ed617f 100644 --- a/src/uihelper.cpp +++ b/src/uihelper.cpp @@ -519,7 +519,7 @@ void press_stop(){ ui->metronome->update(left); - ui->arranger->scrollTo(0,ui->arranger->scrolly); + ui->arranger->scrollTo(ui->arranger->tick2xpix(left),ui->arranger->scrolly); } -- 2.11.4.GIT