]> git.sesse.net Git - kdenlive/blobdiff - src/customtrackview.cpp
Merge branch 'master' into feature/pkey
[kdenlive] / src / customtrackview.cpp
index 166990f43d1800f24ed9f65835884050cce9308b..6e9706fe05adee5248c0d4310e95239ae1172862 100644 (file)
@@ -459,7 +459,7 @@ void CustomTrackView::mouseMoveEvent(QMouseEvent * event)
                     if (parent)
                         parent->resizeStart((int)(snappedPos - m_dragItemInfo.startPos.frames(m_document->fps())));
                 } else {
-                    m_dragItem->resizeStart((int)(snappedPos));
+                    m_dragItem->resizeStart((int)(snappedPos), true, false);
                 }
                 QString crop = m_document->timecode().getDisplayTimecode(m_dragItem->cropStart(), KdenliveSettings::frametimecode());
                 QString duration = m_document->timecode().getDisplayTimecode(m_dragItem->cropDuration(), KdenliveSettings::frametimecode());
@@ -472,7 +472,7 @@ void CustomTrackView::mouseMoveEvent(QMouseEvent * event)
                     if (parent)
                         parent->resizeEnd((int)(snappedPos - m_dragItemInfo.endPos.frames(m_document->fps())));
                 } else {
-                    m_dragItem->resizeEnd((int)(snappedPos));
+                    m_dragItem->resizeEnd((int)(snappedPos), false);
                 }
                 QString duration = m_document->timecode().getDisplayTimecode(m_dragItem->cropDuration(), KdenliveSettings::frametimecode());
                 QString offset = m_document->timecode().getDisplayTimecode(m_dragItem->cropDuration() - m_dragItemInfo.cropDuration, KdenliveSettings::frametimecode());
@@ -2770,7 +2770,9 @@ void CustomTrackView::adjustTimelineClips(EDITMODE mode, ClipItem *item, ItemInf
                         new RazorClipCommand(this, clipInfo, info.startPos, false, command);
                         new ResizeClipCommand(this, dupInfo, newdupInfo, false, false, command);
                         ClipItem *dup = cutClip(clipInfo, info.startPos, true, false);
-                        if (dup) dup->resizeStart(info.endPos.frames(m_document->fps()));
+                        if (dup) {
+                           dup->resizeStart(info.endPos.frames(m_document->fps()));
+                       }
                     } else {
                         ItemInfo newclipInfo = clip->info();
                         newclipInfo.endPos = info.startPos;
@@ -3943,6 +3945,7 @@ void CustomTrackView::mouseReleaseEvent(QMouseEvent * event)
             }
         } else {
             prepareResizeClipStart(m_dragItem, m_dragItemInfo, m_dragItem->startPos().frames(m_document->fps()));
+           if (m_dragItem->type() == AVWIDGET) static_cast <ClipItem*>(m_dragItem)->slotUpdateRange();
         }
     } else if (m_operationMode == RESIZEEND && m_dragItem->endPos() != m_dragItemInfo.endPos) {
         // resize end
@@ -3968,6 +3971,7 @@ void CustomTrackView::mouseReleaseEvent(QMouseEvent * event)
             }
         } else {
             prepareResizeClipEnd(m_dragItem, m_dragItemInfo, m_dragItem->endPos().frames(m_document->fps()));
+           if (m_dragItem->type() == AVWIDGET) static_cast <ClipItem*>(m_dragItem)->slotUpdateRange();
         }
     } else if (m_operationMode == FADEIN) {
         // resize fade in effect
@@ -4881,8 +4885,9 @@ void CustomTrackView::resizeClip(const ItemInfo &start, const ItemInfo &end, boo
         ItemInfo clipinfo = item->info();
         clipinfo.track = m_document->tracksCount() - clipinfo.track;
         bool success = m_document->renderer()->mltResizeClipStart(clipinfo, end.startPos - clipinfo.startPos);
-        if (success)
+        if (success) {
             item->resizeStart((int) end.startPos.frames(m_document->fps()));
+       }
         else
             emit displayMessage(i18n("Error when resizing clip"), ErrorMessage);
     } else {