]> git.sesse.net Git - kdenlive/commitdiff
Fix problem in add track, might solve:
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Thu, 11 Dec 2008 13:06:39 +0000 (13:06 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Thu, 11 Dec 2008 13:06:39 +0000 (13:06 +0000)
http://www.kdenlive.org:80/mantis/view.php?id=452

svn path=/branches/KDE4/; revision=2775

src/customtrackview.cpp
src/customtrackview.h

index 475cf94b8995eb6b5c7de82cc9abceec204b8ff5..a9e6cdb1e538f4cd8d139460c67c22810a3534e7 100644 (file)
@@ -2821,10 +2821,9 @@ void CustomTrackView::slotInsertTrack(int ix) {
             info.isMute = false;
             info.isBlind = true;
         }
-        addTimelineTrack(ix, info);
+        AddTrackCommand *addTrack = new AddTrackCommand(this, ix, info, true, true);
+       m_commandStack->push(addTrack);
         m_document->setModified(true);
-        /*AddTrackCommand* command = new AddTrackCommand(this, ix, info, true, true);
-        m_commandStack->push(command);*/
     }
 }
 
@@ -2866,14 +2865,6 @@ void CustomTrackView::slotChangeTrack(int ix) {
     }
 }
 
-void CustomTrackView::addTimelineTrack(int ix, TrackInfo trackinfo) {
-    double startY = ix * m_tracksHeight + 1 + m_tracksHeight / 2;
-    QRectF r(0, startY, sceneRect().width(), sceneRect().height() - startY);
-    QList<QGraphicsItem *> selection = m_scene->items(r);
-    kDebug() << "// TRK RECT: " << r << ", ITEMS: " << selection.count();
-    AddTrackCommand *addTrack = new AddTrackCommand(this, ix, trackinfo, true, true, addTrack);
-    m_commandStack->push(addTrack);
-}
 
 void CustomTrackView::deleteTimelineTrack(int ix, TrackInfo trackinfo) {
     double startY = ix * m_tracksHeight + 1 + m_tracksHeight / 2;
index 02c93a7f37aa3f7ddff98c8c117aba472a0e32f6..5bee9d2099f1e020f294074bda663de740043896 100644 (file)
@@ -102,7 +102,6 @@ public:
     void slotRemoveSpace();
     void insertSpace(const GenTime &pos, int track, const GenTime duration, bool add);
     ClipItem *getActiveClipUnderCursor(bool allowOutsideCursor = false) const;
-    void addTimelineTrack(int ix, TrackInfo trackinfo);
     void deleteTimelineTrack(int ix, TrackInfo trackinfo);
     void changeTimelineTrack(int ix, TrackInfo trackinfo);