Commit fe02d755 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Solved resize beyond 0 pos bug.

Fixes #129
parent b452c1bd
......@@ -201,9 +201,12 @@ void AbstractGraphicsMediaItem::resize( qint64 size, From from )
m_resizeExpected = true;
qint64 oldLength = clip()->getLength();
qint64 newStart = startPos() + ( oldLength - size );
if ( newStart < 0 )
return ;
tracksView()->getRenderer()->resizeClip( clip(), qMax( clip()->getEnd() - size, (qint64)0 ), clip()->getEnd(),
startPos() + ( oldLength - size ), trackNumber(), mediaType() );
setStartPos( startPos() + ( oldLength - size ) );
newStart, trackNumber(), mediaType() );
setStartPos( newStart );
}
else
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment