]> git.sesse.net Git - kdenlive/blobdiff - src/abstractclipitem.cpp
Allow to do a rectangle selection (Shift + click) also when starting the rectangle...
[kdenlive] / src / abstractclipitem.cpp
index bcb42eb2937a3c1700a339a214aedd8988a261b2..d6a8f391f0b58f979f28fece3a54d2da8457a29f 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <QPainter>
 #include <QToolTip>
+#include <QGraphicsSceneMouseEvent>
 
 AbstractClipItem::AbstractClipItem(const ItemInfo info, const QRectF& rect, double fps) :
         QObject(),
@@ -418,3 +419,12 @@ bool AbstractClipItem::isItemLocked() const
     return !(flags() & (QGraphicsItem::ItemIsSelectable));
 }
 
+// virtual
+void AbstractClipItem::mousePressEvent(QGraphicsSceneMouseEvent * event)
+{
+    if (event->modifiers() & Qt::ShiftModifier) {
+        // User want to do a rectangle selection, so ignore the event to pass it to the view
+        event->ignore();
+    } else QGraphicsItem::mousePressEvent(event);
+}
+