From e02a307498858bc5938e63311fff51c2a6c29132 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Fri, 22 Jan 2021 19:25:22 +1100 Subject: [PATCH] timeline: don't copy vectors This is no longer necessary --- app/widget/timelinewidget/timelinewidget.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/app/widget/timelinewidget/timelinewidget.cpp b/app/widget/timelinewidget/timelinewidget.cpp index 863b7eb89..9de9c62d6 100644 --- a/app/widget/timelinewidget/timelinewidget.cpp +++ b/app/widget/timelinewidget/timelinewidget.cpp @@ -500,10 +500,8 @@ void TimelineWidget::IncreaseTrackHeight() return; } - QVector all_tracks = GetConnectedNode()->GetTracks(); - // Increase the height of each track by one "unit" - foreach (Track* t, all_tracks) { + foreach (Track* t, GetConnectedNode()->GetTracks()) { t->SetTrackHeight(t->GetTrackHeight() + Track::kTrackHeightInterval); } } @@ -514,10 +512,8 @@ void TimelineWidget::DecreaseTrackHeight() return; } - QVector all_tracks = GetConnectedNode()->GetTracks(); - // Decrease the height of each track by one "unit" - foreach (Track* t, all_tracks) { + foreach (Track* t, GetConnectedNode()->GetTracks()) { t->SetTrackHeight(qMax(t->GetTrackHeight() - Track::kTrackHeightInterval, Track::kTrackHeightMinimum)); } } @@ -534,12 +530,10 @@ void TimelineWidget::OverwriteFootageAtPlayhead(const QVector &footag void TimelineWidget::ToggleLinksOnSelected() { - QVector sel = GetSelectedBlocks(); - QVector blocks; bool link = true; - foreach (Block* item, sel) { + foreach (Block* item, GetSelectedBlocks()) { // Only clips can be linked if (item->type() != Block::kClip) { continue;