]> git.sesse.net Git - kdenlive/commitdiff
Fix error in track number for producer:
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Mon, 9 Aug 2010 19:42:04 +0000 (19:42 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Mon, 9 Aug 2010 19:42:04 +0000 (19:42 +0000)
http://www.kdenlive.org/mantis/view.php?id=1722

svn path=/trunk/kdenlive/; revision=4694

src/customtrackview.cpp

index 10d45ec935f754c04c66c3dbb7d4a17643ac5cc7..1730722c418ea0aee77d50aec8ffdac385d73b8d 100644 (file)
@@ -3001,10 +3001,10 @@ void CustomTrackView::mouseReleaseEvent(QMouseEvent * event)
             if (m_dragItem->type() == AVWIDGET && (m_dragItemInfo.startPos != info.startPos || m_dragItemInfo.track != info.track)) {
                 ClipItem *item = static_cast <ClipItem *>(m_dragItem);
                 Mlt::Producer *prod;
-                if (item->isAudioOnly()) prod = item->baseClip()->audioProducer(m_dragItemInfo.track);
+                if (item->isAudioOnly()) prod = item->baseClip()->audioProducer(info.track);
                 else if (item->isVideoOnly()) prod = item->baseClip()->videoProducer();
-                else prod = item->baseClip()->producer(m_dragItemInfo.track);
-                bool success = m_document->renderer()->mltMoveClip((int)(m_document->tracksCount() - m_dragItemInfo.track), (int)(m_document->tracksCount() - m_dragItem->track()), (int) m_dragItemInfo.startPos.frames(m_document->fps()), (int)(m_dragItem->startPos().frames(m_document->fps())), prod, m_scene->editMode() == OVERWRITEEDIT, m_scene->editMode() == INSERTEDIT);
+                else prod = item->baseClip()->producer(info.track);
+                bool success = m_document->renderer()->mltMoveClip((int)(m_document->tracksCount() - m_dragItemInfo.track), (int)(m_document->tracksCount() - info.track), (int) m_dragItemInfo.startPos.frames(m_document->fps()), (int)(info.startPos.frames(m_document->fps())), prod, m_scene->editMode() == OVERWRITEEDIT, m_scene->editMode() == INSERTEDIT);
 
                 if (success) {
                     QUndoCommand *moveCommand = new QUndoCommand();