Commit 23e6bc80 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Fixing effect adding.

parent 86d12965
......@@ -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;
}
......
......@@ -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();
......
......@@ -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 ;
......
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