From: Till Theato Date: Wed, 10 Aug 2011 13:15:25 +0000 (+0000) Subject: When multiple clips are selected do not allow resizing, but moving only: X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=7f01cbf6b0914abf5c244c9e79ba748f1643e92b;p=kdenlive When multiple clips are selected do not allow resizing, but moving only: http://kdenlive.org/mantis/view.php?id=2257 svn path=/trunk/kdenlive/; revision=5829 --- diff --git a/CHANGELOG b/CHANGELOG index 2ea21d68..a6701f8b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,6 @@ HEAD + * When multiple clips are selected do not allow resizing, but moving only. (http://kdenlive.org/mantis/view.php?id=2257) * Add remux with MKV transcode preset. * Make audio only render profiles faster by telling ffmpeg to skip video. * Open documents using a locale different to the system as read only. diff --git a/src/customtrackview.cpp b/src/customtrackview.cpp index 8dc02d45..36bc11c2 100644 --- a/src/customtrackview.cpp +++ b/src/customtrackview.cpp @@ -584,7 +584,14 @@ void CustomTrackView::mouseMoveEvent(QMouseEvent * event) event->accept(); return; } - opMode = clip->operationMode(mapToScene(event->pos())); + + if (m_selectionGroup && clip->parentItem() == m_selectionGroup) { + // all other modes break the selection, so the user probably wants to move it + opMode = MOVE; + } else { + opMode = clip->operationMode(mapToScene(event->pos())); + } + const double size = 5; if (opMode == m_moveOpMode) { QGraphicsView::mouseMoveEvent(event); @@ -967,7 +974,12 @@ void CustomTrackView::mousePressEvent(QMouseEvent * event) if (event->modifiers() != Qt::ControlModifier && m_operationMode == NONE) QGraphicsView::mousePressEvent(event); m_clickPoint = QPoint((int)(mapToScene(event->pos()).x() - m_dragItem->startPos().frames(m_document->fps())), (int)(event->pos().y() - m_dragItem->pos().y())); - m_operationMode = m_dragItem->operationMode(mapToScene(event->pos())); + if (m_selectionGroup && m_dragItem->parentItem() == m_selectionGroup) { + // all other modes break the selection, so the user probably wants to move it + m_operationMode = MOVE; + } else { + m_operationMode = m_dragItem->operationMode(mapToScene(event->pos())); + } m_controlModifier = (event->modifiers() == Qt::ControlModifier); // Update snap points