]> git.sesse.net Git - kdenlive/commitdiff
Allow resizing images in timeline from start:
authorTill Theato <root@ttill.de>
Thu, 6 May 2010 07:24:29 +0000 (07:24 +0000)
committerTill Theato <root@ttill.de>
Thu, 6 May 2010 07:24:29 +0000 (07:24 +0000)
http://kdenlive.org/mantis/view.php?id=1575

svn path=/trunk/kdenlive/; revision=4412

src/clipitem.cpp

index 0492669dbb665ec4ff075a4a256cb6c3de4e3fce..463ffed5c91f964f692c9120ae3f88b3cb4250df 100644 (file)
@@ -1143,7 +1143,17 @@ void ClipItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *)
 void ClipItem::resizeStart(int posx)
 {
     const int min = (startPos() - cropStart()).frames(m_fps);
-    if (posx < min) posx = min;
+    if (posx < min) {
+        if (clipType() == IMAGE || clipType() == COLOR || clipType() == TEXT) {
+            GenTime oldPos = startPos();
+            moveBy(-1 * (oldPos - GenTime(posx, m_fps)).frames(m_fps), 0);
+            const int newPos = (endPos() + (oldPos - startPos())).frames(m_fps);
+            AbstractClipItem::resizeEnd(newPos);
+        }
+        posx = min;
+    }
+    
+    
     if (posx == startPos().frames(m_fps)) return;
     const int previous = cropStart().frames(m_fps);
     AbstractClipItem::resizeStart(posx);