Commit 13b9b7bb authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

TracksView: Avoid double effects addition

parent 4f8e9c55
......@@ -763,6 +763,7 @@ TracksView::dropEvent( QDropEvent *event )
QList<AbstractGraphicsMediaItem*> clips = mediaItems<AbstractGraphicsMediaItem>( event->pos() );
if ( clips.size() > 0 )
{
m_itemsLoaded.insert( m_dragEffectItem->helper()->uuid() );
AbstractGraphicsMediaItem *item = clips.first();
Commands::trigger( new Commands::Effect::Add( m_dragEffectItem->effectHelper(),
item->clipHelper()->clipWorkflow() ) );
......@@ -777,6 +778,7 @@ TracksView::dropEvent( QDropEvent *event )
GraphicsTrack *track = qgraphicsitem_cast<GraphicsTrack*>( item );
if ( track != NULL )
{
m_itemsLoaded.insert( m_dragEffectItem->helper()->uuid() );
Commands::trigger( new Commands::Effect::Add( m_dragEffectItem->effectHelper(),
track->trackWorkflow() ) );
m_dragEffectItem->m_oldTrack = track->trackWorkflow();
......
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