]> git.sesse.net Git - kdenlive/blobdiff - src/abstractgroupitem.cpp
Allow to do a rectangle selection (Shift + click) also when starting the rectangle...
[kdenlive] / src / abstractgroupitem.cpp
index b33ec93b8102b973343123b4d5d029dbdcf91dca..f49e84d83568442b06c950906d268da461399b3b 100644 (file)
@@ -30,7 +30,7 @@
 #include <QStyleOptionGraphicsItem>
 #include <QDomDocument>
 #include <QMimeData>
-
+#include <QGraphicsSceneMouseEvent>
 
 AbstractGroupItem::AbstractGroupItem(double /* fps */) :
         QObject(),
@@ -234,3 +234,12 @@ void AbstractGroupItem::dragLeaveEvent(QGraphicsSceneDragDropEvent *event)
 {
     Q_UNUSED(event);
 }
+
+// virtual
+void AbstractGroupItem::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);
+}