footageproperties: fixed bug that failed to update image sequence end time
This commit is contained in:
@@ -87,7 +87,7 @@ FootagePropertiesDialog::FootagePropertiesDialog(QWidget *parent, Footage *foota
|
||||
|
||||
connect(track_list, SIGNAL(currentRowChanged(int)), stacked_widget_, SLOT(setCurrentIndex(int)));
|
||||
|
||||
QDialogButtonBox* buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
|
||||
QDialogButtonBox* buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
|
||||
buttons->setCenterButtons(true);
|
||||
layout->addWidget(buttons, row, 0, 1, 2);
|
||||
|
||||
|
||||
@@ -113,10 +113,13 @@ void VideoStreamProperties::Accept(QUndoCommand *parent)
|
||||
if (IsImageSequence(stream_.get())) {
|
||||
VideoStreamPtr video_stream = std::static_pointer_cast<VideoStream>(stream_);
|
||||
|
||||
if (video_stream->start_time() != imgseq_start_time_->GetValue()) {
|
||||
int64_t new_dur = imgseq_end_time_->GetValue() - imgseq_start_time_->GetValue();
|
||||
|
||||
if (video_stream->start_time() != imgseq_start_time_->GetValue()
|
||||
|| video_stream->duration() != new_dur) {
|
||||
new ImageSequenceChangeCommand(video_stream,
|
||||
imgseq_start_time_->GetValue(),
|
||||
imgseq_end_time_->GetValue() - imgseq_start_time_->GetValue(),
|
||||
new_dur,
|
||||
parent);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user