[vlmc-devel] commit: timeline: code cleanup (Ludovic Fauvet )

git at videolan.org git at videolan.org
Sun Mar 14 14:25:19 CET 2010


vlmc | branch: master | Ludovic Fauvet <etix at l0cal.com> | Sat Mar 13 22:05:18 2010 +0100| [3c93b4158fecd8957384aa7460b78e9e3bf55867] | committer: Ludovic Fauvet 

timeline: code cleanup

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

 src/Gui/timeline/TracksView.cpp |   16 ++++------------
 src/Gui/timeline/TracksView.h   |    7 -------
 2 files changed, 4 insertions(+), 19 deletions(-)

diff --git a/src/Gui/timeline/TracksView.cpp b/src/Gui/timeline/TracksView.cpp
index f9fc9a9..f17f74c 100644
--- a/src/Gui/timeline/TracksView.cpp
+++ b/src/Gui/timeline/TracksView.cpp
@@ -49,8 +49,6 @@ TracksView::TracksView( QGraphicsScene *scene, MainWorkflow *mainWorkflow,
     //TODO should be defined by the settings
     m_tracksHeight = 25;
 
-    m_tracksCount = mainWorkflow->getTrackCount( MainWorkflow::VideoTrack );
-
     m_numAudioTrack = 0;
     m_numVideoTrack = 0;
     m_dragVideoItem = NULL;
@@ -638,16 +636,10 @@ TracksView::dragLeaveEvent( QDragLeaveEvent *event )
     if ( m_dragAudioItem || m_dragVideoItem )
         updateDurationNeeded = true;
 
-    if ( m_dragAudioItem )
-    {
-        delete m_dragAudioItem;
-        m_dragAudioItem = NULL;
-    }
-    if ( m_dragVideoItem )
-    {
-        delete m_dragVideoItem;
-        m_dragVideoItem = NULL;
-    }
+    delete m_dragAudioItem;
+    delete m_dragVideoItem;
+    m_dragAudioItem = NULL;
+    m_dragVideoItem = NULL;
 
     if ( updateDurationNeeded )
         updateDuration();
diff --git a/src/Gui/timeline/TracksView.h b/src/Gui/timeline/TracksView.h
index 65c4a67..e6310af 100644
--- a/src/Gui/timeline/TracksView.h
+++ b/src/Gui/timeline/TracksView.h
@@ -110,12 +110,6 @@ public:
      */
     int tracksHeight() const { return m_tracksHeight; }
     /**
-     * \brief Get the number of tracks.
-     * \warning This method only returns tracks of type VideoTrack!
-     * \return The number of tracks.
-     */
-    unsigned int tracksCount() const { return m_tracksCount; }
-    /**
      * \brief Change the position of the cursor.
      * \param pos The position where to move the cursor, in frames.
      * \sa cursorPos
@@ -311,7 +305,6 @@ private:
     GraphicsTrack           *getTrack( MainWorkflow::TrackType type, unsigned int number );
     QGraphicsScene          *m_scene;
     int                     m_tracksHeight;
-    unsigned int            m_tracksCount;
     int                     m_projectDuration;
     GraphicsCursorItem      *m_cursorLine;
     QGraphicsLinearLayout   *m_layout;



More information about the Vlmc-devel mailing list