Skip to content

Commit

Permalink
don't change sampleTco length if tempo changed (LMMS#3543)
Browse files Browse the repository at this point in the history
  • Loading branch information
BaraMGB authored and PhysSong committed Jul 8, 2017
1 parent 0857100 commit 89e684c
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/tracks/SampleTrack.cpp
Expand Up @@ -148,7 +148,7 @@ void SampleTCO::setSampleBuffer( SampleBuffer* sb )
void SampleTCO::setSampleFile( const QString & _sf )
{
m_sampleBuffer->setAudioFile( _sf );
updateLength();
changeLength( (int) ( m_sampleBuffer->frames() / Engine::framesPerTick() ) );

emit sampleChanged();
emit playbackPositionChanged();
Expand Down Expand Up @@ -199,7 +199,7 @@ void SampleTCO::setIsPlaying(bool isPlaying)

void SampleTCO::updateLength()
{
changeLength( sampleLength() );
emit sampleChanged();
}


Expand Down Expand Up @@ -505,12 +505,6 @@ void SampleTCOView::paintEvent( QPaintEvent * pe )
// disable antialiasing for borders, since its not needed
p.setRenderHint( QPainter::Antialiasing, false );

if( r.width() < width() - 1 )
{
p.drawLine( r.x(), r.y() + r.height() / 2,
rect().right() - TCO_BORDER_WIDTH, r.y() + r.height() / 2 );
}

// inner border
p.setPen( c.lighter( 160 ) );
p.drawRect( 1, 1, rect().right() - TCO_BORDER_WIDTH,
Expand Down

0 comments on commit 89e684c

Please sign in to comment.