[vlmc-devel] commit: AbstractGraphicsMediaItem: Removing a nasty forest boolean ( © ) ( Hugo Beauzée-Luyssen )

git at videolan.org git at videolan.org
Thu Aug 26 23:51:30 CEST 2010


vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Thu Aug 26 23:39:56 2010 +0200| [46b19e1e544a7c84fcb7d621703d1b5952985fde] | committer: Hugo Beauzée-Luyssen 

AbstractGraphicsMediaItem: Removing a nasty forest boolean (©)

This can't be the right way.

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

 src/Gui/timeline/AbstractGraphicsMediaItem.cpp |   13 ++-----------
 src/Gui/timeline/AbstractGraphicsMediaItem.h   |    3 ---
 2 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/src/Gui/timeline/AbstractGraphicsMediaItem.cpp b/src/Gui/timeline/AbstractGraphicsMediaItem.cpp
index 267ef17..585f1f5 100644
--- a/src/Gui/timeline/AbstractGraphicsMediaItem.cpp
+++ b/src/Gui/timeline/AbstractGraphicsMediaItem.cpp
@@ -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() );
 }
diff --git a/src/Gui/timeline/AbstractGraphicsMediaItem.h b/src/Gui/timeline/AbstractGraphicsMediaItem.h
index 2e4b640..f26922d 100644
--- a/src/Gui/timeline/AbstractGraphicsMediaItem.h
+++ b/src/Gui/timeline/AbstractGraphicsMediaItem.h
@@ -177,9 +177,6 @@ private:
     bool    m_muted;
 
     QColor  m_itemColor;
-
-    //FIXME: this is a nasty forest boolean
-    bool    m_resizeExpected;
 };
 
 #endif // ABSTRACTGRAPHICSMEDIAITEM_H



More information about the Vlmc-devel mailing list