[vlmc-devel] commit: TracksView: Initialize GraphicsEffectItem m_tracksView field. ( Hugo Beauzée-Luyssen )

git at videolan.org git at videolan.org
Thu Sep 9 20:16:35 CEST 2010


vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Thu Sep  9 10:13:53 2010 +0200| [b4d294968655dd90094f4be809b44f7a7e8a04e4] | committer: Hugo Beauzée-Luyssen 

TracksView: Initialize GraphicsEffectItem m_tracksView field.

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

 src/Gui/timeline/TracksView.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/Gui/timeline/TracksView.cpp b/src/Gui/timeline/TracksView.cpp
index ccb1dbb..e4d368e 100644
--- a/src/Gui/timeline/TracksView.cpp
+++ b/src/Gui/timeline/TracksView.cpp
@@ -321,6 +321,8 @@ TracksView::effectDragEnterEvent( QDragEnterEvent *event )
     if ( effect != NULL )
     {
         m_dragEffectItem = new GraphicsEffectItem( effect );
+        m_dragEffectItem->setHeight( m_dragEffectItem->itemHeight() );
+        m_dragEffectItem->m_tracksView = this;
     }
     else
         qWarning() << "Can't find effect name" << event->mimeData()->data( "vlmc/effect_name");
@@ -382,7 +384,6 @@ TracksView::dragMoveEvent( QDragMoveEvent *event )
             AbstractGraphicsMediaItem   *item = itemList.first();
             m_dragEffectItem->setWidth( item->clipHelper()->length() );
             m_dragEffectItem->setStartPos( item->startPos() );
-            m_dragEffectItem->setHeight( m_dragEffectItem->itemHeight() );
             m_dragEffectItem->setTrack( getTrack( m_dragEffectItem->trackType(), 0 ) );
             m_dragEffectItem->setZValue( 100 );
         }
@@ -396,7 +397,6 @@ TracksView::dragMoveEvent( QDragMoveEvent *event )
                 {
                     m_dragEffectItem->setWidth( track->maximumWidth() );
                     m_dragEffectItem->setStartPos( 0 );
-                    m_dragEffectItem->setHeight( m_dragEffectItem->itemHeight() );
                     m_dragEffectItem->setTrack( track );
                     break ;
                 }



More information about the Vlmc-devel mailing list