Fix corruption on resize color/title clips after reloading /editing clip from bin

parent c619fd15
......@@ -415,8 +415,12 @@ void ProducerQueue::processFileProperties()
if (info.xml.hasAttribute(QStringLiteral("length"))) {
length = info.xml.attribute(QStringLiteral("length")).toInt();
clipOut = length - 1;
} else {
length = EffectsList::property(info.xml, QStringLiteral("length")).toInt();
clipOut = info.xml.attribute(QStringLiteral("out")).toInt() - info.xml.attribute(QStringLiteral("in")).toInt();
if (length < clipOut)
length = clipOut + 1;
}
else length = info.xml.attribute(QStringLiteral("out")).toInt() - info.xml.attribute(QStringLiteral("in")).toInt() + 1;
// Pass duration if it was forced
if (info.xml.hasAttribute(QStringLiteral("duration"))) {
duration = info.xml.attribute(QStringLiteral("duration")).toInt();
......
......@@ -5056,7 +5056,9 @@ Transition *CustomTrackView::getTransitionItemAtStart(GenTime pos, int track)
bool CustomTrackView::moveClip(const ItemInfo &start, const ItemInfo &end, bool refresh, bool alreadyMoved, ItemInfo *out_actualEnd)
{
if (m_selectionGroup) resetSelectionGroup(false);
if (m_selectionGroup) {
resetSelectionGroup(false);
}
ClipItem *item = NULL;
if (alreadyMoved) {
item = getClipItemAtStart(end.startPos, end.track);
......@@ -5110,7 +5112,7 @@ bool CustomTrackView::moveClip(const ItemInfo &start, const ItemInfo &end, bool
}*/
KdenliveSettings::setSnaptopoints(snap);
}
if (refresh)
if (refresh)
monitorRefresh(range, true);
if (out_actualEnd != NULL) {
*out_actualEnd = item->info();
......
......@@ -231,6 +231,7 @@ void MoveManager::mouseRelease(GenTime pos)
item = m_view->getClipItemAtStart(info.startPos, info.track, info.endPos);
if (item) {
item->setItemLocked(isLocked);
item->setSelected(true);
}
} else {
// undo last move and emit error message
......
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