footageviewer: ensure footage is set to nullptr when disconnecting and update stack
This commit is contained in:
@@ -57,6 +57,9 @@ void FootageViewerWidget::SetFootage(Footage *footage)
|
||||
|
||||
ConnectViewerNode(nullptr);
|
||||
|
||||
video_node_->SetFootage(nullptr);
|
||||
audio_node_->SetFootage(nullptr);
|
||||
|
||||
NodeParam::DisconnectEdge(video_node_->output(), sequence_.viewer_output()->texture_input());
|
||||
NodeParam::DisconnectEdge(audio_node_->output(), sequence_.viewer_output()->samples_input());
|
||||
}
|
||||
|
||||
@@ -242,6 +242,9 @@ void ViewerWidget::DisconnectNodeInternal(ViewerOutput *n)
|
||||
|
||||
waveform_view_->SetViewer(nullptr);
|
||||
waveform_view_->ConnectTimelinePoints(nullptr);
|
||||
|
||||
// Queue an UpdateStack so that when it runs, the viewer node will be fully disconnected
|
||||
QMetaObject::invokeMethod(this, "UpdateStack", Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
void ViewerWidget::ConnectedNodeChanged(ViewerOutput *n)
|
||||
@@ -687,7 +690,10 @@ void ViewerWidget::UpdateStack()
|
||||
} else {
|
||||
// Otherwise show regular display
|
||||
stack_->setCurrentWidget(sizer_);
|
||||
new_tb = GetConnectedNode()->video_params().time_base();
|
||||
|
||||
if (GetConnectedNode()) {
|
||||
new_tb = GetConnectedNode()->video_params().time_base();
|
||||
}
|
||||
}
|
||||
|
||||
if (new_tb != timebase()) {
|
||||
|
||||
Reference in New Issue
Block a user