Fix speed effect breaking

parent e098d1f9
......@@ -1105,7 +1105,7 @@ void Bin::selectProxyModel(const QModelIndex &id)
m_openAction->setEnabled(type == Image || type == Audio);
if (m_propertiesPanel->isVisible()) {
// if info panel is displayed, update info
showClipProperties(static_cast<ProjectClip*>(currentItem));
showClipProperties(static_cast<ProjectClip*>(currentItem), false);
}
m_deleteAction->setText(i18n("Delete Clip"));
m_proxyAction->setText(i18n("Proxy Clip"));
......@@ -1441,9 +1441,15 @@ void Bin::slotSwitchClipProperties(const QModelIndex &ix)
if (ix.isValid()) {
// User clicked in the icon, open clip properties
if (m_propertiesPanel->isHidden()) {
m_propertiesPanel->show();
AbstractProjectItem *item = static_cast<AbstractProjectItem*>(m_proxyModel->mapToSource(ix).internalPointer());
AbstractProjectItem *item = static_cast<AbstractProjectItem*>(m_proxyModel->mapToSource(ix).internalPointer());
ProjectClip *clip = qobject_cast<ProjectClip*>(item);
if (clip && clip->clipType() == Text) {
m_propertiesPanel->hide();
} else {
m_propertiesPanel->setEnabled(true);
m_propertiesPanel->show();
}
showClipProperties(clip);
}
else m_propertiesPanel->hide();
......@@ -1464,7 +1470,7 @@ void Bin::slotShowClipProperties()
}
}
void Bin::showClipProperties(ProjectClip *clip)
void Bin::showClipProperties(ProjectClip *clip, bool openExternalDialog )
{
if (!m_editAction->isChecked()) return;
if (clip && !clip->isReady()) {
......@@ -1479,7 +1485,7 @@ void Bin::showClipProperties(ProjectClip *clip)
delete w;
}*/
m_propertiesPanel->setEnabled(false);
showTitleWidget(clip);
if (openExternalDialog) showTitleWidget(clip);
return;
}
if (clip && clip->clipType() == SlideShow) {
......
......@@ -616,7 +616,7 @@ private:
InvalidDialog *m_invalidClipDialog;
/** @brief Set to true if widget just gained focus (means we have to update effect stack . */
bool m_gainedFocus;
void showClipProperties(ProjectClip *clip);
void showClipProperties(ProjectClip *clip, bool openExternalDialog = true);
const QStringList getFolderInfo(QModelIndex selectedIx = QModelIndex());
/** @brief Get the QModelIndex value for an item in the Bin. */
QModelIndex getIndexForId(const QString &id, bool folderWanted) const;
......
......@@ -189,8 +189,11 @@ const QString ClipController::clipId()
}
// static
const char *ClipController::getPassPropertiesList()
const char *ClipController::getPassPropertiesList(bool passLength)
{
if (!passLength) {
return "kdenlive:proxy,kdenlive:originalurl,force_aspect_num,force_aspect_den,force_aspect_ratio,force_fps,force_progressive,force_tff,threads,force_colorspace,set.force_full_luma,file_hash";
}
return "kdenlive:proxy,kdenlive:originalurl,force_aspect_num,force_aspect_den,force_aspect_ratio,force_fps,force_progressive,force_tff,threads,force_colorspace,set.force_full_luma,templatetext,file_hash,xmldata,length";
}
......
......@@ -180,7 +180,7 @@ public:
Mlt::Profile *profile();
/** @brief When replacing a producer, it is important that we keep some properties, for exemple force_ stuff and url for proxies
* this method returns a list of properties that we want to keep when replacing a producer . */
static const char *getPassPropertiesList();
static const char *getPassPropertiesList(bool passLength = true);
/** @brief Disable all Kdenlive effects on this clip */
void disableEffects(bool disable);
......
......@@ -1404,7 +1404,7 @@ int Timeline::changeClipSpeed(ItemInfo info, ItemInfo speedIndependantInfo, Play
}
Mlt::Properties passProperties;
Mlt::Properties original(originalProd->get_properties());
passProperties.pass_list(original, ClipController::getPassPropertiesList());
passProperties.pass_list(original, ClipController::getPassPropertiesList(false));
return track(info.track)->changeClipSpeed(info, speedIndependantInfo, state, speed, strobe, prod, passProperties);
}
......
......@@ -751,7 +751,6 @@ int Track::changeClipSpeed(ItemInfo info, ItemInfo speedIndependantInfo, Playlis
int duration = speedIndependantInfo.cropDuration.frames(m_fps) / speed;
int originalStart = (int)(speedIndependantInfo.cropStart.frames(m_fps) / speed);
// Check that the blank space is long enough for our new duration
clipIndex = m_playlist.get_clip_index_at(startPos);
int blankEnd = m_playlist.clip_start(clipIndex) + m_playlist.clip_length(clipIndex);
......
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