Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes bug on resizing and tempo change #3543

Merged
merged 1 commit into from May 14, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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