]> git.sesse.net Git - kdenlive/blobdiff - src/abstractgroupitem.cpp
Re-enable monitor overlay info & fix openGL crash
[kdenlive] / src / abstractgroupitem.cpp
index 9442aa2ba08c227bfc31e582e675790832489e0e..4ea3e8783134c6a489897ce0c2b0613561618949 100644 (file)
@@ -118,6 +118,11 @@ void AbstractGroupItem::addItem(QGraphicsItem * item)
     item->setFlag(QGraphicsItem::ItemIsMovable, false);
 }
 
+void AbstractGroupItem::removeItem(QGraphicsItem * item)
+{
+    removeFromGroup(item);
+}
+
 void AbstractGroupItem::fixItemRect()
 {
     QPointF start = boundingRect().topLeft();
@@ -387,7 +392,17 @@ 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);
+    } else {
+       QList <QGraphicsItem *>list = scene()->items(event->scenePos());
+       // only allow group move if we click over an item in the group
+       foreach(const QGraphicsItem *item, list) {
+           if (item->type() == TRANSITIONWIDGET || item->type() == AVWIDGET) {
+               QGraphicsItem::mousePressEvent(event);
+               return;
+           }
+       }
+       event->ignore();
+    }
 }
 
 void AbstractGroupItem::resizeStart(int diff)