fixed bug that wouldn't set a footage stream's enabled property correctly
This commit is contained in:
@@ -106,7 +106,7 @@ void FootagePropertiesDialog::accept() {
|
||||
for (int i=0;i<footage_->streams().size();i++) {
|
||||
bool stream_enabled = (track_list->item(i)->checkState() == Qt::Checked);
|
||||
|
||||
if (footage_->stream(i)->enabled() == stream_enabled) {
|
||||
if (footage_->stream(i)->enabled() != stream_enabled) {
|
||||
new StreamEnableChangeCommand(footage_->stream(i),
|
||||
stream_enabled,
|
||||
command);
|
||||
@@ -144,14 +144,13 @@ void FootagePropertiesDialog::FootageChangeCommand::undo()
|
||||
FootagePropertiesDialog::StreamEnableChangeCommand::StreamEnableChangeCommand(StreamPtr stream, bool enabled, QUndoCommand *command) :
|
||||
QUndoCommand(command),
|
||||
stream_(stream),
|
||||
old_enabled_(stream->enabled()),
|
||||
new_enabled_(enabled)
|
||||
{
|
||||
}
|
||||
|
||||
void FootagePropertiesDialog::StreamEnableChangeCommand::redo()
|
||||
{
|
||||
old_enabled_ = stream_->enabled();
|
||||
|
||||
stream_->set_enabled(new_enabled_);
|
||||
}
|
||||
|
||||
|
||||
@@ -200,6 +200,7 @@ private:
|
||||
virtual void DragMove(TimelineViewMouseEvent *event) override;
|
||||
virtual void DragLeave(QDragLeaveEvent *event) override;
|
||||
virtual void DragDrop(TimelineViewMouseEvent *event) override;
|
||||
|
||||
private:
|
||||
int import_pre_buffer_;
|
||||
};
|
||||
|
||||
@@ -64,7 +64,6 @@ void TimelineWidget::ImportTool::DragEnter(TimelineViewMouseEvent *event)
|
||||
|
||||
// Listen for MIME data from a ProjectViewModel
|
||||
if (mime_formats.contains("application/x-oliveprojectitemdata")) {
|
||||
// FIXME: Implement audio insertion
|
||||
|
||||
// Data is drag/drop data from a ProjectViewModel
|
||||
QByteArray model_data = event->GetMimeData()->data("application/x-oliveprojectitemdata");
|
||||
@@ -107,7 +106,7 @@ void TimelineWidget::ImportTool::DragEnter(TimelineViewMouseEvent *event)
|
||||
TrackType track_type = TrackTypeFromStreamType(stream->type());
|
||||
|
||||
// Check if this stream has a compatible TrackList
|
||||
if (track_type == kTrackTypeNone) {
|
||||
if (track_type == kTrackTypeNone || !stream->enabled()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,6 @@ void FootageViewerWidget::SetFootage(Footage *footage)
|
||||
|
||||
if (audio_stream) {
|
||||
audio_node_->SetFootage(audio_stream);
|
||||
qDebug() << "Audio stream channel layout:" << audio_stream->channel_layout();
|
||||
viewer_node_->set_audio_params(AudioParams(audio_stream->sample_rate(), audio_stream->channel_layout()));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user