From 4268ccd75e384d34353161b695b49fc23c2f9421 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Wed, 22 Jul 2020 10:32:04 +1000 Subject: [PATCH] importtool: fixed broken snapping Snap points were made before the ghost's in/outs were set resulting in incorrect points. --- app/widget/timelinewidget/tool/import.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/widget/timelinewidget/tool/import.cpp b/app/widget/timelinewidget/tool/import.cpp index 5d9150388..8a409f0ab 100644 --- a/app/widget/timelinewidget/tool/import.cpp +++ b/app/widget/timelinewidget/tool/import.cpp @@ -258,9 +258,6 @@ void TimelineWidget::ImportTool::FootageToGhosts(rational ghost_start, const QLi // Increment track count for this track type track_offsets[track_type]++; - snap_points_.append(ghost->In()); - snap_points_.append(ghost->Out()); - ghost->setData(TimelineViewGhostItem::kAttachedFootage, QVariant::fromValue(stream)); ghost->SetMode(Timeline::kMove); @@ -277,6 +274,9 @@ void TimelineWidget::ImportTool::FootageToGhosts(rational ghost_start, const QLi ghost->SetIn(ghost_start); ghost->SetOut(ghost_start + footage_duration); + snap_points_.append(ghost->In()); + snap_points_.append(ghost->Out()); + parent()->AddGhost(ghost); }