diff --git a/timeline/sequence.cpp b/timeline/sequence.cpp index a5f501b92..842d966c0 100644 --- a/timeline/sequence.cpp +++ b/timeline/sequence.cpp @@ -758,18 +758,22 @@ void Sequence::DeleteAreas(ComboAction* ca, QVector areas, bool desel } } - // deselect selected clip areas + // Get ripple point and ripple length long minimum_in = LONG_MAX; long minimum_length = LONG_MAX; + for (int i=0;i area_copy = areas; for (int i=0;iDeselectArea(s.in(), s.out()); - - // Get ripple point and ripple length - minimum_in = qMin(minimum_in, s.in()); - minimum_length = qMin(minimum_length, s.in() - s.out()); } } @@ -895,7 +899,7 @@ void Sequence::RippleDeleteArea(ComboAction* ca, long ripple_point, long ripple_ // We've already tested `track`, so we don't need to test it again long first_in_point_after_point = LONG_MAX; - long out_point_just_before_first_in_point = LONG_MIN; + long out_point_just_before_first_in_point = 0; QVector track_clips = t->GetAllClips(); diff --git a/ui/timelineview.cpp b/ui/timelineview.cpp index 54525e621..f5c470ee3 100644 --- a/ui/timelineview.cpp +++ b/ui/timelineview.cpp @@ -2441,8 +2441,11 @@ void TimelineView::mouseMoveEvent(QMouseEvent *event) { foreach (track, selected_tracks) { // Loop through track's clips for clips touching this rectangle + for (int i=0;iClipCount();i++) { + Clip* clip = track->GetClip(i).get(); + if (!(clip->timeline_out() < frame_min || clip->timeline_in() > frame_max) ) { // create a group of the clip (and its links if alt is not pressed) diff --git a/undo/undo.cpp b/undo/undo.cpp index fb1d07e45..34fb4cd27 100644 --- a/undo/undo.cpp +++ b/undo/undo.cpp @@ -71,7 +71,7 @@ void MoveClipAction::doUndo() { // Move clip to the new track ONLY IF the old track currently contains this clip - a workaround to ensure this // action doesn't accidentaly add a clip that it's not supposed to - if (new_track->ContainsClip(clip.get())) { + if (old_track != new_track && new_track->ContainsClip(clip.get())) { old_track->AddClip(clip); } @@ -92,7 +92,7 @@ void MoveClipAction::doRedo() { // Move clip to the new track ONLY IF the old track currently contains this clip - a workaround to ensure this // action doesn't accidentaly add a clip that it's not supposed to - if (old_track->ContainsClip(clip.get())) { + if (old_track != new_track && old_track->ContainsClip(clip.get())) { new_track->AddClip(clip); } @@ -1012,7 +1012,7 @@ void RippleAction::doRedo() { length, 0, c->track(), - true, + false, true); } }