This commit is contained in:
itsmattkc
2019-05-09 11:11:24 +10:00
parent fc94881865
commit 3fe0d1cda5
3 changed files with 16 additions and 9 deletions
+10 -6
View File
@@ -758,18 +758,22 @@ void Sequence::DeleteAreas(ComboAction* ca, QVector<Selection> 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<areas.size();i++) {
const Selection& s = areas.at(i);
minimum_in = qMin(minimum_in, s.in());
minimum_length = qMin(minimum_length, s.in() - s.out());
}
// deselect selected clip areas
if (deselect_areas) {
QVector<Selection> area_copy = areas;
for (int i=0;i<area_copy.size();i++) {
const Selection& s = area_copy.at(i);
s.track()->DeselectArea(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<Clip*> track_clips = t->GetAllClips();
+3
View File
@@ -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;i<track->ClipCount();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)
+3 -3
View File
@@ -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);
}
}