Fix title/color clip duration broken after edit

CCBUG: 365653
parent 10dd671d
...@@ -3023,8 +3023,6 @@ void Bin::showTitleWidget(ProjectClip *clip) ...@@ -3023,8 +3023,6 @@ void Bin::showTitleWidget(ProjectClip *clip)
int currentLength = clip->getProducerIntProperty(QStringLiteral("length")); int currentLength = clip->getProducerIntProperty(QStringLiteral("length"));
if (currentLength <= dia_ui.duration()) { if (currentLength <= dia_ui.duration()) {
newprops.insert(QStringLiteral("length"), QString::number(dia_ui.duration())); newprops.insert(QStringLiteral("length"), QString::number(dia_ui.duration()));
} else {
newprops.insert(QStringLiteral("length"), clip->getProducerProperty(QStringLiteral("length")));
} }
} }
// trigger producer reload // trigger producer reload
......
...@@ -353,7 +353,7 @@ void ClipItem::resetThumbs(bool clearExistingThumbs) ...@@ -353,7 +353,7 @@ void ClipItem::resetThumbs(bool clearExistingThumbs)
void ClipItem::refreshClip(bool checkDuration, bool forceResetThumbs) void ClipItem::refreshClip(bool checkDuration, bool forceResetThumbs)
{ {
if (checkDuration && (m_maxDuration != m_binClip->duration())) { if (checkDuration && m_binClip->hasLimitedDuration() && (m_maxDuration != m_binClip->duration())) {
m_maxDuration = m_binClip->duration(); m_maxDuration = m_binClip->duration();
if (m_clipType != Image && m_clipType != Text && m_clipType != QText && m_clipType != Color && m_clipType != TextTemplate) { if (m_clipType != Image && m_clipType != Text && m_clipType != QText && m_clipType != Color && m_clipType != TextTemplate) {
if (m_maxDuration != GenTime() && m_info.cropStart + m_info.cropDuration > m_maxDuration) { if (m_maxDuration != GenTime() && m_info.cropStart + m_info.cropDuration > m_maxDuration) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment