]> git.sesse.net Git - kdenlive/blobdiff - src/transition.cpp
Edit clip when double clicking on it's thumbnail in project tree
[kdenlive] / src / transition.cpp
index de83b5979eed6a3e593a81a98ebb84af42cb5bc4..10b03740654832b42f6e922008552fe18fc08410 100644 (file)
@@ -79,7 +79,9 @@ Transition::Transition(const ItemInfo info, int transitiontrack, double fps, QDo
 Transition::~Transition()
 {
     blockSignals(true);
+#if QT_VERSION >= 0x040600
     delete m_startAnimation;
+#endif
     if (scene()) scene()->removeItem(this);
 }
 
@@ -209,6 +211,10 @@ int Transition::type() const
 //virtual
 QVariant Transition::itemChange(GraphicsItemChange change, const QVariant &value)
 {
+    if (change == QGraphicsItem::ItemSelectedChange) {
+        if (value.toBool()) setZValue(10);
+        else setZValue(3);
+    }
     if (change == ItemPositionChange && scene()) {
         // calculate new position.
         QPointF newPos = value.toPointF();
@@ -229,6 +235,7 @@ QVariant Transition::itemChange(GraphicsItemChange change, const QVariant &value
 
         if (!items.isEmpty()) {
             for (int i = 0; i < items.count(); i++) {
+                if (!items.at(i)->isEnabled()) continue;
                 if (items.at(i)->type() == type()) {
                     // Collision! Don't move.
                     //kDebug()<<"/// COLLISION WITH ITEM: "<<items.at(i)->boundingRect()<<", POS: "<<items.at(i)->pos()<<", ME: "<<newPos;