timeline: snap pointer and import operations to timebase

If frame rates are mixed, ensures that video doesn't end up falling or ending on half frames which potentially make the entire sequence awkward
This commit is contained in:
itsmattkc
2020-11-25 11:46:41 +11:00
parent c35005d1bf
commit b5cc13c10e
10 changed files with 75 additions and 34 deletions
+5 -8
View File
@@ -353,14 +353,6 @@ void TimelineWidget::PasteNodesFromClipboardInternal(QXmlStreamReader *reader, X
}
}
rational TimelineWidget::GetToolTipTimebase() const
{
if (GetConnectedNode() && use_audio_time_units_) {
return GetConnectedNode()->audio_params().time_base();
}
return timebase();
}
void TimelineWidget::SelectAll()
{
QVector<Block*> newly_selected_blocks;
@@ -1211,6 +1203,11 @@ TimelineView *TimelineWidget::GetFirstTimelineView()
return views_.first()->view();
}
rational TimelineWidget::GetTimebaseForTrackType(Timeline::TrackType type)
{
return views_.at(type)->view()->timebase();
}
const QRect& TimelineWidget::GetRubberBandGeometry() const
{
return rubberband_.geometry();