X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fclipdurationdialog.cpp;h=a9fbb934af4bc0228d55598b2cb703e2dcf6e76c;hb=71e41ad0c197e2e2eb033dff7800427f64d3428f;hp=18838af418fcde95b3bcf26be163496fdff61cc6;hpb=bc466710b2ce4939247da2d2ad567a0683d995cf;p=kdenlive diff --git a/src/clipdurationdialog.cpp b/src/clipdurationdialog.cpp index 18838af4..a9fbb934 100644 --- a/src/clipdurationdialog.cpp +++ b/src/clipdurationdialog.cpp @@ -23,6 +23,7 @@ #include #include +#include #include @@ -36,13 +37,13 @@ ClipDurationDialog::ClipDurationDialog(AbstractClipItem *clip, Timecode tc, GenT setupUi(this); m_pos = new TimecodeDisplay(tc); - m_dur = new TimecodeDisplay(tc); m_cropStart = new TimecodeDisplay(tc); + m_dur = new TimecodeDisplay(tc); m_cropEnd = new TimecodeDisplay(tc); clip_position_box->addWidget(m_pos); + crop_start_box->addWidget(m_cropStart); clip_duration_box->addWidget(m_dur); - crop_start_box->addWidget(m_cropStart), crop_end_box->addWidget(m_cropEnd); bool allowCrop = true; @@ -144,13 +145,14 @@ void ClipDurationDialog::slotCheckEnd() { GenTime cropStart = m_cropStart->gentime(); GenTime cropEnd = m_cropEnd->gentime(); - GenTime duration = m_clip->maxDuration() - cropStart - cropEnd; + GenTime duration = m_clip->maxDuration() - cropEnd - cropStart; if (duration >= GenTime()) { m_dur->setValue(duration); + slotCheckDuration(); } else { m_cropEnd->blockSignals(true); - m_cropEnd->setValue(m_clip->maxDuration() - cropStart - m_dur->gentime()); + m_cropEnd->setValue(m_clip->maxDuration() - m_dur->gentime() - cropStart); m_cropEnd->blockSignals(false); } }