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

AbstractGraphicsMediaItem: Removing a nasty forest boolean (©)

This can't be the right way.
parent 42656bc7
......@@ -42,8 +42,7 @@ AbstractGraphicsMediaItem::AbstractGraphicsMediaItem( Clip* clip ) :
m_group( NULL ),
m_width( 0 ),
m_height( 0 ),
m_muted( false ),
m_resizeExpected( false )
m_muted( false )
{
m_clipHelper = new ClipHelper( clip );
// Adjust the width
......@@ -62,8 +61,7 @@ AbstractGraphicsMediaItem::AbstractGraphicsMediaItem( ClipHelper* ch ) :
m_group( NULL ),
m_width( 0 ),
m_height( 0 ),
m_muted( false ),
m_resizeExpected( false )
m_muted( false )
{
// Adjust the width
setWidth( ch->length() );
......@@ -279,7 +277,6 @@ void AbstractGraphicsMediaItem::resize( qint64 size, From from )
if ( m_clipHelper->clip()->begin() > newBegin )
return;
m_resizeExpected = true;
qint64 oldLength = m_clipHelper->length();
qint64 newStart = startPos() + ( oldLength - size );
if ( newStart < 0 )
......@@ -290,7 +287,6 @@ void AbstractGraphicsMediaItem::resize( qint64 size, From from )
}
else
{
m_resizeExpected = true;
qint64 oldLength = m_clipHelper->length();
track()->trackWorkflow()->moveClip( m_clipHelper->uuid(), startPos() + ( oldLength - size ) );
m_clipHelper->setBegin( startPos() + ( oldLength - size ) );
......@@ -303,11 +299,6 @@ void AbstractGraphicsMediaItem::resize( qint64 size, From from )
void AbstractGraphicsMediaItem::adjustLength()
{
if ( m_resizeExpected == true )
{
m_resizeExpected = false;
return ;
}
Q_ASSERT( m_clipHelper );
setWidth( m_clipHelper->length() );
}
......
......@@ -177,9 +177,6 @@ private:
bool m_muted;
QColor m_itemColor;
//FIXME: this is a nasty forest boolean
bool m_resizeExpected;
};
#endif // ABSTRACTGRAPHICSMEDIAITEM_H
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