Timeline: Fix waveform offset drawing.

This commit is contained in:
Jonathan Moore Liles 2012-12-15 18:45:56 -08:00
parent 8a6772b6b9
commit 94d55bd4e1
1 changed files with 2 additions and 2 deletions

View File

@ -505,7 +505,7 @@ Audio_Region::draw ( void )
return;
if ( start() > timeline->xoffset + timeline->x_to_ts( sequence()->w() ) ||
if ( start() > timeline->xoffset + timeline->x_to_ts( sequence()->drawable_w() ) ||
start() + length() < timeline->xoffset )
/* not in viewport */
return;
@ -525,7 +525,7 @@ Audio_Region::draw ( void )
/* calculate waveform offset due to scrolling */
/* offset is the number of frames into the waveform the value of X translates to */
nframes_t x_frame = timeline->xoffset + timeline->x_to_ts( X - _sequence->x() );
nframes_t x_frame = timeline->xoffset + timeline->x_to_ts( X - _sequence->drawable_x() );
nframes_t offset = 0;
if ( x_frame < start() )