Browse Source

Timeline: Fix waveform offset drawing.

tags/non-daw-v1.2.0
Jonathan Moore Liles 12 years ago
parent
commit
94d55bd4e1
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      timeline/src/Audio_Region.C

+ 2
- 2
timeline/src/Audio_Region.C View File

@@ -505,7 +505,7 @@ Audio_Region::draw ( void )
return; 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 ) start() + length() < timeline->xoffset )
/* not in viewport */ /* not in viewport */
return; return;
@@ -525,7 +525,7 @@ Audio_Region::draw ( void )


/* calculate waveform offset due to scrolling */ /* calculate waveform offset due to scrolling */
/* offset is the number of frames into the waveform the value of X translates to */ /* 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; nframes_t offset = 0;


if ( x_frame < start() ) if ( x_frame < start() )


Loading…
Cancel
Save