implemented reveal in footage viewer option

Fixes #1958
This commit is contained in:
itsmattkc
2022-06-27 23:40:05 -07:00
parent 079d6beff2
commit 89927c71ff
10 changed files with 79 additions and 4 deletions
+16
View File
@@ -38,6 +38,22 @@ FootageViewerWidget::FootageViewerWidget(QWidget *parent) :
controls_->SetAudioVideoDragButtonsVisible(true);
connect(controls_, &PlaybackControls::VideoPressed, this, &FootageViewerWidget::StartVideoDrag);
connect(controls_, &PlaybackControls::AudioPressed, this, &FootageViewerWidget::StartAudioDrag);
override_workarea_ = new TimelineWorkArea(this);
}
void FootageViewerWidget::OverrideWorkArea(const TimeRange &r)
{
override_workarea_->set_enabled(true);
override_workarea_->set_range(r);
this->ConnectWorkArea(override_workarea_);
}
void FootageViewerWidget::ResetWorkArea()
{
if (GetConnectedWorkArea() == override_workarea_) {
this->ConnectWorkArea(GetConnectedNode() ? GetConnectedNode()->GetWorkArea() : nullptr);
}
}
void FootageViewerWidget::ConnectNodeEvent(ViewerOutput *n)
+5
View File
@@ -32,6 +32,9 @@ class FootageViewerWidget : public ViewerWidget
public:
FootageViewerWidget(QWidget* parent = nullptr);
void OverrideWorkArea(const TimeRange &r);
void ResetWorkArea();
protected:
virtual void ConnectNodeEvent(ViewerOutput *) override;
@@ -42,6 +45,8 @@ private:
QHash<ViewerOutput*, rational> cached_timestamps_;
TimelineWorkArea *override_workarea_;
private slots:
void StartFootageDrag();