]> git.sesse.net Git - kdenlive/commitdiff
When multiple clips are selected do not allow resizing, but moving only:
authorTill Theato <root@ttill.de>
Wed, 10 Aug 2011 13:15:25 +0000 (13:15 +0000)
committerTill Theato <root@ttill.de>
Wed, 10 Aug 2011 13:15:25 +0000 (13:15 +0000)
http://kdenlive.org/mantis/view.php?id=2257

svn path=/trunk/kdenlive/; revision=5829

CHANGELOG
src/customtrackview.cpp

index 2ea21d68f796a50a17127f91be1cf7c603b05aac..a6701f8bf02e1d2b95e15dc28081126416aa001c 100644 (file)
--- 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.
index 8dc02d4517a1f4d5b4ac53653137e130cc1abcfe..36bc11c20d1ed4122c401a81bf023358a8ef8922 100644 (file)
@@ -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