[vlmc-devel] commit: Fixing effect adding. ( 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:51:21 2010 +0200| [23e6bc80c0d78ef9e7f7840a57bf6b7c668c096f] | committer: Hugo Beauzée-Luyssen 

Fixing effect adding.

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=23e6bc80c0d78ef9e7f7840a57bf6b7c668c096f
---

 src/Gui/timeline/GraphicsEffectItem.cpp |    8 +++++---
 src/Gui/timeline/GraphicsEffectItem.h   |    2 +-
 src/Gui/timeline/TracksView.cpp         |    4 ++--
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/Gui/timeline/GraphicsEffectItem.cpp b/src/Gui/timeline/GraphicsEffectItem.cpp
index 00eb064..4cc5b5d 100644
--- a/src/Gui/timeline/GraphicsEffectItem.cpp
+++ b/src/Gui/timeline/GraphicsEffectItem.cpp
@@ -30,6 +30,8 @@
 
 #include <QPainter>
 
+#include <QtDebug>
+
 GraphicsEffectItem::GraphicsEffectItem( Effect *effect ) :
         m_effect( effect ),
         m_effectHelper( NULL )
@@ -184,10 +186,10 @@ GraphicsEffectItem::paintTitle( QPainter* painter, const QStyleOptionGraphicsIte
     painter->drawText( mapped, Qt::AlignVCenter, fm.elidedText( text, Qt::ElideRight, mapped.width() ) );
 }
 
-Effect*
-GraphicsEffectItem::effect()
+EffectHelper*
+GraphicsEffectItem::effectHelper()
 {
-    return m_effect;
+    return m_effectHelper;
 }
 
 
diff --git a/src/Gui/timeline/GraphicsEffectItem.h b/src/Gui/timeline/GraphicsEffectItem.h
index c84a28c..59187b5 100644
--- a/src/Gui/timeline/GraphicsEffectItem.h
+++ b/src/Gui/timeline/GraphicsEffectItem.h
@@ -41,7 +41,7 @@ class GraphicsEffectItem : public AbstractGraphicsItem
         virtual void                paint( QPainter *painter, const QStyleOptionGraphicsItem *option,
                                            QWidget *widget );
         virtual Workflow::TrackType trackType() const;
-        Effect*                     effect();
+        EffectHelper*               effectHelper();
         virtual qint64              begin() const;
         virtual qint64              end() const;
         virtual Workflow::Helper    *helper();
diff --git a/src/Gui/timeline/TracksView.cpp b/src/Gui/timeline/TracksView.cpp
index b3f6918..148309e 100644
--- a/src/Gui/timeline/TracksView.cpp
+++ b/src/Gui/timeline/TracksView.cpp
@@ -741,7 +741,7 @@ TracksView::dropEvent( QDropEvent *event )
         if ( clips.size() > 0 )
         {
             AbstractGraphicsMediaItem   *item = clips.first();
-            item->clipHelper()->clipWorkflow()->addEffect( m_dragEffectItem->effect() );
+            item->clipHelper()->clipWorkflow()->addEffect( m_dragEffectItem->effectHelper() );
             m_dragEffectItem->m_oldTrack = item->track()->trackWorkflow();
             event->acceptProposedAction();
         }
@@ -753,7 +753,7 @@ TracksView::dropEvent( QDropEvent *event )
                 GraphicsTrack   *track = qgraphicsitem_cast<GraphicsTrack*>( item );
                 if ( track != NULL )
                 {
-                    track->trackWorkflow()->addEffect( m_dragEffectItem->effect() );
+                    track->trackWorkflow()->addEffect( m_dragEffectItem->effectHelper() );
                     m_dragEffectItem->m_oldTrack = track->trackWorkflow();
                     event->acceptProposedAction();
                     break ;



More information about the Vlmc-devel mailing list