]> git.sesse.net Git - kdenlive/blobdiff - src/customtrackview.cpp
Check for invalid producers / entries when opening document:
[kdenlive] / src / customtrackview.cpp
index 3dcc23b6d44cfb30c9ea2a8736969923e8f32885..4441372c7e5f8eb68c6fdfdcfebada99f6156e3a 100644 (file)
@@ -81,7 +81,7 @@
 CustomTrackView::CustomTrackView(KdenliveDoc *doc, CustomTrackScene* projectscene, QWidget *parent)
         : QGraphicsView(projectscene, parent), m_scene(projectscene), m_cursorPos(0), m_cursorLine(NULL), m_operationMode(NONE), m_dragItem(NULL), m_visualTip(NULL), m_moveOpMode(NONE), m_animation(NULL), m_projectDuration(0), m_clickPoint(QPoint()), m_document(doc), m_autoScroll(KdenliveSettings::autoscroll()), m_tracksHeight(KdenliveSettings::trackheight()), m_tool(SELECTTOOL), m_dragGuide(NULL), m_findIndex(0), m_menuPosition(QPoint()), m_blockRefresh(false), m_selectionGroup(NULL), m_selectedTrack(0), m_copiedItems(QList<AbstractClipItem *> ()), m_scrollOffset(0), m_changeSpeedAction(NULL), m_pasteEffectsAction(NULL) {
     if (doc) m_commandStack = doc->commandStack();
-    else m_commandStack == NULL;
+    else m_commandStack = NULL;
     setMouseTracking(true);
     setAcceptDrops(true);
     m_animationTimer = new QTimeLine(800);
@@ -1126,7 +1126,7 @@ void CustomTrackView::updateEffect(int track, GenTime pos, QDomElement effect, i
         }
         if (effectParams.paramValue("disabled") == "1") {
             if (m_document->renderer()->mltRemoveEffect(track, pos, effectParams.paramValue("kdenlive_ix"), false)) {
-                kDebug() << "//////  DISABLING EFFECT: " << index << ", CURRENTLA: " << clip->selectedEffectIndex();
+                kDebug() << "//////  DISABLING EFFECT: " << ix << ", CURRENTLA: " << clip->selectedEffectIndex();
             } else emit displayMessage(i18n("Problem deleting effect"), ErrorMessage);
         } else if (!m_document->renderer()->mltEditEffect(m_document->tracksCount() - clip->track(), clip->startPos(), effectParams))
             emit displayMessage(i18n("Problem editing effect"), ErrorMessage);
@@ -1878,8 +1878,6 @@ void CustomTrackView::mouseReleaseEvent(QMouseEvent * event) {
         m_dragItem = NULL;
         return;
     } else if (m_operationMode == SPACER) {
-        int endClick = (int)(mapToScene(event->pos()).x() + 0.5);
-        int mappedClick = (int)(mapToScene(m_clickEvent).x() + 0.5);
         int track = (int)(mapToScene(m_clickEvent).y() / m_tracksHeight);
         if (m_selectionGroup->sceneBoundingRect().height() > m_tracksHeight) {
             // We are moving all tracks
@@ -3075,7 +3073,7 @@ void CustomTrackView::slotDeleteAllGuides() {
     QUndoCommand *deleteAll = new QUndoCommand();
     deleteAll->setText("Delete all guides");
     for (int i = 0; i < m_guides.count(); i++) {
-        EditGuideCommand *command = new EditGuideCommand(this, m_guides.at(i)->position(), m_guides.at(i)->label(), GenTime(), QString(), true, deleteAll);
+        new EditGuideCommand(this, m_guides.at(i)->position(), m_guides.at(i)->label(), GenTime(), QString(), true, deleteAll);
     }
     m_commandStack->push(deleteAll);
 }