[vlmc-devel] commit: TracksView: Correctly initialize new effect items. ( Hugo Beauzée-Luyssen )
git at videolan.org
git at videolan.org
Wed Sep 8 22:09:24 CEST 2010
vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Wed Sep 8 21:25:56 2010 +0200| [86d1296512984b9f1e5dc30de30f1ca998c4c864] | committer: Hugo Beauzée-Luyssen
TracksView: Correctly initialize new effect items.
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=86d1296512984b9f1e5dc30de30f1ca998c4c864
---
src/Gui/timeline/TracksView.cpp | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/Gui/timeline/TracksView.cpp b/src/Gui/timeline/TracksView.cpp
index 36c6a53..b3f6918 100644
--- a/src/Gui/timeline/TracksView.cpp
+++ b/src/Gui/timeline/TracksView.cpp
@@ -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 ;
+ }
}
}
}
More information about the Vlmc-devel
mailing list