Commit 60bec5e4 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

TracksView: Allow a clip effect to be resized.

parent a67350a0
......@@ -77,7 +77,7 @@ GraphicsEffectItem::moveable() const
bool
GraphicsEffectItem::hasResizeBoundaries() const
{
return false;
return ( m_effectHelper->end() != -1 );
}
Workflow::TrackType
......@@ -212,13 +212,15 @@ GraphicsEffectItem::effectHelper()
qint64
GraphicsEffectItem::begin() const
{
return 0;
return m_effectHelper->begin();
}
qint64
GraphicsEffectItem::end() const
{
return -1;
if ( m_effectHelper->end() < 0 )
return m_effectHelper->target()->length();
return m_effectHelper->end();
}
Workflow::Helper*
......
......@@ -901,13 +901,16 @@ TracksView::mouseMoveEvent( QMouseEvent *event )
QList<QGraphicsItem*> gi = scene()->items( collidePos );
bool collide = false;
for ( int i = 0; i < gi.count(); ++i )
if ( m_actionItem->type() != GraphicsEffectItem::Type )
{
AbstractGraphicsMediaItem* mi = dynamic_cast<AbstractGraphicsMediaItem*>( gi.at( i ) );
if ( mi && mi != m_actionItem )
for ( int i = 0; i < gi.count(); ++i )
{
collide = true;
break;
AbstractGraphicsMediaItem* mi = dynamic_cast<AbstractGraphicsMediaItem*>( gi.at( i ) );
if ( mi && mi != m_actionItem )
{
collide = true;
break;
}
}
}
// END UGLY
......
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