GenTime durationDiff = GenTime(posx, m_fps) - m_startPos;
if (durationDiff == GenTime()) return;
//kDebug() << "-- RESCALE: CROP=" << m_cropStart << ", DIFF = " << durationDiff;
- if (m_cropStart + durationDiff < GenTime()) {
+
+ if (m_cropStart + durationDiff < GenTime() && type() == 70000) {
durationDiff = GenTime() - m_cropStart;
} else if (durationDiff >= m_cropDuration) {
durationDiff = m_cropDuration - GenTime(3, m_fps);
}
+
m_startPos += durationDiff;
m_cropStart += durationDiff;
m_cropDuration = m_cropDuration - durationDiff;
if (m_operationMode == MOVE) {
double snappedPos = getSnapPointForPos(mapToScene(event->pos()).x() - m_clickPoint);
kDebug() << "/////// MOVE CLIP, EVENT Y: ";//<<event->scenePos().y()<<", SCENE HEIGHT: "<<scene()->sceneRect().height();
- int moveTrack = (int) mapToScene(event->pos()).y() / 50;
+ int moveTrack = (int) mapToScene(event->pos() - QPoint(0, (m_dragItem->type() == 70001 ? 25 : 0))).y() / 50;
int currentTrack = m_dragItem->track();
if (moveTrack > m_tracksCount - 1) moveTrack = m_tracksCount - 1;
else if (m_operationMode == RESIZEEND)
m_startPos = QPointF(m_dragItem->endPos().frames(m_document->fps()), m_dragItem->track());
else if (m_operationMode == TRANSITIONSTART) {
- Transition *tr = new Transition(QRect(m_dragItem->rect().x() , m_dragItem->rect().height() / 2, (m_dragItem->startPos() + GenTime(2.5)).frames(25.0) , m_dragItem->rect().height()), (ClipItem*)m_dragItem, LUMA_TRANSITION, m_dragItem->startPos(), m_dragItem->startPos() + GenTime(2.5), m_document->fps());
+ Transition *tr = new Transition(
+ QRect(m_dragItem->startPos().frames(m_document->fps()) *m_scale , m_dragItem->rect().height() / 2,
+ GenTime(2.5).frames(m_document->fps()) *m_scale , m_dragItem->rect().height()
+ ),
+ (ClipItem*)m_dragItem, LUMA_TRANSITION, m_dragItem->startPos(), m_dragItem->startPos() + GenTime(2.5), m_document->fps());
+ tr->setTrack(m_dragItem->track());
scene()->addItem(tr);
//m_dragItem->addTransition(tra);
}