Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Better transition move between tracks

svn path=/branches/KDE4/; revision=2288
parent 440e8f98
......@@ -178,10 +178,10 @@ void CustomTrackView::mouseMoveEvent(QMouseEvent * event) {
if (m_operationMode == MOVE && (event->pos() - m_clickEvent).manhattanLength() >= QApplication::startDragDistance()) {
double snappedPos = getSnapPointForPos(mapToScene(event->pos()).x() - m_clickPoint.x());
//kDebug() << "/////// MOVE CLIP, EVENT Y: "<<m_clickPoint.y();//<<event->scenePos().y()<<", SCENE HEIGHT: "<<scene()->sceneRect().height();
int moveTrack = (int) mapToScene(event->pos() + QPoint(0, (m_dragItem->type() == TRANSITIONWIDGET ? - m_clickPoint.y() : 0))).y() / m_tracksHeight;
int moveTrack = (int) mapToScene(event->pos() - QPoint(0, (m_dragItem->type() == TRANSITIONWIDGET ? m_dragItem->boundingRect().height() / 2 : 0))).y() / m_tracksHeight;
int currentTrack = m_dragItem->track();
if (moveTrack > 1000)moveTrack = 0;
if (moveTrack > 1000) moveTrack = 0;
else if (moveTrack > m_tracksList.count() - 1) moveTrack = m_tracksList.count() - 1;
else if (moveTrack < 0) moveTrack = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment