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

GraphicsEffectItem: Fixing resize boundaries

parent ffc4c2a3
......@@ -153,11 +153,11 @@ class AbstractGraphicsItem : public QObject, public QGraphicsItem
/**
* \brief Return the begin boundaries for the item.
*/
virtual qint64 maxBegin() const { return 0; }
virtual qint64 maxBegin() const = 0;
/**
* \brief Return the end boundaries for the item.
*/
virtual qint64 maxEnd() const { return -1; }
virtual qint64 maxEnd() const = 0;
protected:
static const quint32 RounderRectRadius = 5;
......
......@@ -226,6 +226,18 @@ GraphicsEffectItem::end() const
return m_effectHelper->end();
}
qint64
GraphicsEffectItem::maxBegin() const
{
return 0;
}
qint64
GraphicsEffectItem::maxEnd() const
{
return m_effectHelper->target()->length();
}
Workflow::Helper*
GraphicsEffectItem::helper()
{
......
......@@ -45,6 +45,8 @@ class GraphicsEffectItem : public AbstractGraphicsItem
EffectHelper* effectHelper();
virtual qint64 begin() const;
virtual qint64 end() const;
virtual qint64 maxBegin() const;
virtual qint64 maxEnd() const;
virtual Workflow::Helper *helper();
virtual void triggerMove(TrackWorkflow *oldTrack, TrackWorkflow *newTrack,
Workflow::Helper *helper, qint64 pos);
......
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