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

Fixed crash when resizing an audio track

parent 00f99d10
......@@ -114,7 +114,7 @@ void AbstractGraphicsMediaItem::resize( qint64 size, From from )
if ( clip()->getBegin() + size > clip()->getMaxEnd() )
return ;
tracksView()->getRenderer()->resizeClip( clip(), clip()->getBegin(), clip()->getBegin() + size, 0, //This parameter is unused in this case
trackNumber(), MainWorkflow::VideoTrack );
trackNumber(), mediaType() );
}
else
{
......@@ -129,7 +129,7 @@ void AbstractGraphicsMediaItem::resize( qint64 size, From from )
// }
m_resizeExpected = true;
tracksView()->getRenderer()->resizeClip( clip(), qMax( clip()->getEnd() - size, (qint64)0 ), clip()->getEnd(),
startPos() + ( oldLength - size ), trackNumber(), MainWorkflow::VideoTrack );
startPos() + ( oldLength - size ), trackNumber(), mediaType() );
setStartPos( startPos() + ( oldLength - size ) );
}
......
......@@ -808,7 +808,7 @@ void TracksView::mouseReleaseEvent( QMouseEvent* event )
//we can have an undo action.
Commands::trigger( new Commands::MainWorkflow::ResizeClip( m_renderer, clip->getUuid(), clip->getBegin(),
clip->getEnd(), m_actionResizeOldBegin, m_actionResizeOldBegin + m_actionResizeBase,
m_actionItem->pos().x(), m_actionResizeStart, m_actionItem->trackNumber(), MainWorkflow::VideoTrack ) );
m_actionItem->pos().x(), m_actionResizeStart, m_actionItem->trackNumber(), m_actionItem->mediaType() ) );
updateDuration();
}
......
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