]> git.sesse.net Git - kdenlive/blobdiff - src/abstractgroupitem.cpp
improve overwrite mode with transitions
[kdenlive] / src / abstractgroupitem.cpp
index 35733c10081f2353fae7db2f068fec4f7719973d..788e015bdb9731ef0e515d3c31d87803240fdf38 100644 (file)
@@ -198,9 +198,10 @@ QVariant AbstractGroupItem::itemChange(GraphicsItemChange change, const QVariant
             return QPointF(pos().x() - start.x(), pos().y());
         }*/
 
-        QPainterPath shape = clipGroupShape(newPos - pos());
         QList<QGraphicsItem*> collindingItems;
+        QPainterPath shape;
         if (projectScene()->editMode() == NORMALEDIT) {
+            shape = clipGroupShape(newPos - pos());
             collindingItems = scene()->items(shape, Qt::IntersectsItemShape);
             for (int i = 0; i < children.count(); i++) {
                 collindingItems.removeAll(children.at(i));
@@ -249,11 +250,12 @@ QVariant AbstractGroupItem::itemChange(GraphicsItemChange change, const QVariant
             }
         }
 
-
-        shape = transitionGroupShape(newPos - pos());
-        collindingItems = scene()->items(shape, Qt::IntersectsItemShape);
-        for (int i = 0; i < children.count(); i++) {
-            collindingItems.removeAll(children.at(i));
+        if (projectScene()->editMode() == NORMALEDIT) {
+            shape = transitionGroupShape(newPos - pos());
+            collindingItems = scene()->items(shape, Qt::IntersectsItemShape);
+            for (int i = 0; i < children.count(); i++) {
+                collindingItems.removeAll(children.at(i));
+            }
         }
         if (collindingItems.isEmpty()) return newPos;
         else {