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);
}
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);
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
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);
}