Commit 86d12965 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

TracksView: Correctly initialize new effect items.

parent a1885317
......@@ -740,10 +740,10 @@ TracksView::dropEvent( QDropEvent *event )
QList<AbstractGraphicsMediaItem*> clips = mediaItems<AbstractGraphicsMediaItem>( event->pos() );
if ( clips.size() > 0 )
{
foreach ( AbstractGraphicsMediaItem *item, clips )
{
item->clipHelper()->clipWorkflow()->addEffect( m_dragEffectItem->effect() );
}
AbstractGraphicsMediaItem *item = clips.first();
item->clipHelper()->clipWorkflow()->addEffect( m_dragEffectItem->effect() );
m_dragEffectItem->m_oldTrack = item->track()->trackWorkflow();
event->acceptProposedAction();
}
else
{
......@@ -752,7 +752,12 @@ TracksView::dropEvent( QDropEvent *event )
{
GraphicsTrack *track = qgraphicsitem_cast<GraphicsTrack*>( item );
if ( track != NULL )
{
track->trackWorkflow()->addEffect( m_dragEffectItem->effect() );
m_dragEffectItem->m_oldTrack = track->trackWorkflow();
event->acceptProposedAction();
break ;
}
}
}
}
......
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