Commit 60b313db authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix bin clip sometimes incorrectly selected causing incorrect drag in timeline

parent aa798c94
...@@ -1659,6 +1659,8 @@ void Bin::setDocument(KdenliveDoc *project) ...@@ -1659,6 +1659,8 @@ void Bin::setDocument(KdenliveDoc *project)
m_proxyModel->selectionModel()->blockSignals(true); m_proxyModel->selectionModel()->blockSignals(true);
} }
setEnabled(false); setEnabled(false);
// Cleanup references in the cli properties dialog
showClipProperties(nullptr);
// Cleanup previous project // Cleanup previous project
m_itemModel->clean(); m_itemModel->clean();
...@@ -2528,6 +2530,9 @@ void Bin::reloadMonitorIfActive(const QString &id) ...@@ -2528,6 +2530,9 @@ void Bin::reloadMonitorIfActive(const QString &id)
{ {
if (m_monitor->activeClipId() == id || m_monitor->activeClipId().isEmpty()) { if (m_monitor->activeClipId() == id || m_monitor->activeClipId().isEmpty()) {
slotOpenCurrent(); slotOpenCurrent();
if (m_monitor->activeClipId() == id) {
showClipProperties(getBinClip(id), true);
}
} }
} }
......
...@@ -457,9 +457,6 @@ bool ProjectClip::setProducer(std::shared_ptr<Mlt::Producer> producer, bool repl ...@@ -457,9 +457,6 @@ bool ProjectClip::setProducer(std::shared_ptr<Mlt::Producer> producer, bool repl
m_clipStatus = StatusReady; m_clipStatus = StatusReady;
setTags(getProducerProperty(QStringLiteral("kdenlive:tags"))); setTags(getProducerProperty(QStringLiteral("kdenlive:tags")));
AbstractProjectItem::setRating((uint) getProducerIntProperty(QStringLiteral("kdenlive:rating"))); AbstractProjectItem::setRating((uint) getProducerIntProperty(QStringLiteral("kdenlive:rating")));
if (!hasProxy()) {
if (auto ptr = m_model.lock()) emit std::static_pointer_cast<ProjectItemModel>(ptr)->refreshPanel(m_binId);
}
if (auto ptr = m_model.lock()) { if (auto ptr = m_model.lock()) {
std::static_pointer_cast<ProjectItemModel>(ptr)->onItemUpdated(std::static_pointer_cast<ProjectClip>(shared_from_this()), std::static_pointer_cast<ProjectItemModel>(ptr)->onItemUpdated(std::static_pointer_cast<ProjectClip>(shared_from_this()),
AbstractProjectItem::DataDuration); AbstractProjectItem::DataDuration);
...@@ -511,7 +508,6 @@ bool ProjectClip::setProducer(std::shared_ptr<Mlt::Producer> producer, bool repl ...@@ -511,7 +508,6 @@ bool ProjectClip::setProducer(std::shared_ptr<Mlt::Producer> producer, bool repl
} }
} }
pCore->bin()->reloadMonitorIfActive(clipId()); pCore->bin()->reloadMonitorIfActive(clipId());
pCore->bin()->updateTargets(clipId());
for (auto &p : m_audioProducers) { for (auto &p : m_audioProducers) {
m_effectStack->removeService(p.second); m_effectStack->removeService(p.second);
} }
......
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