From e1e1d43f615c0802c7b74795fc74182f22e85916 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Wed, 20 Feb 2008 05:48:42 -0600 Subject: [PATCH] Make panning work. --- Region.C | 6 +++++- Track.C | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Region.C b/Region.C index 1efa029..354ed0e 100644 --- a/Region.C +++ b/Region.C @@ -189,12 +189,16 @@ Region::handle ( int m ) int d = (ox + X) - x(); long td = timeline.x_to_ts( d ); + nframes_t W = _end - _start; + if ( td > 0 && os < td ) _start = 0; else _start = os - td; -// redraw(); + _end = _start + W; + + _track->redraw(); return 1; } diff --git a/Track.C b/Track.C index 9bc8fa8..bde8092 100644 --- a/Track.C +++ b/Track.C @@ -170,6 +170,7 @@ Track::handle ( int m ) this->add( r ); + redraw(); return 1; } case FL_MOVE: