Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Restore icon overlay in bin to indicate clip with effects

parent e807e8cb
......@@ -145,7 +145,7 @@ public:
*
* This function is necessary for interaction with ProjectItemModel.
*/
QVariant getData(DataType type) const;
virtual QVariant getData(DataType type) const;
/**
* @brief Returns the amount of different types of data this item supports.
......
......@@ -148,6 +148,12 @@ void ProjectClip::connectEffectStack()
{
connect(m_effectStack.get(), &EffectStackModel::modelChanged, this, &ProjectClip::updateChildProducers);
connect(m_effectStack.get(), &EffectStackModel::dataChanged, this, &ProjectClip::updateChildProducers);
connect(m_effectStack.get(), &EffectStackModel::dataChanged, [&](){
if (auto ptr = m_model.lock()) {
std::static_pointer_cast<ProjectItemModel>(ptr)->onItemUpdated(std::static_pointer_cast<ProjectClip>(shared_from_this()),
AbstractProjectItem::IconOverlay);
}
});
/*connect(m_effectStack.get(), &EffectStackModel::modelChanged, [&](){
qDebug()<<"/ / / STACK CHANGED";
updateChildProducers();
......@@ -934,17 +940,15 @@ bool ProjectClip::rename(const QString &name, int column)
return edited;
}
/*QVariant ProjectClip::getData(DataType type) const
QVariant ProjectClip::getData(DataType type) const
{
switch (type) {
case AbstractProjectItem::IconOverlay:
return hasEffects() ? QVariant("kdenlive-track_has_effect") : QVariant();
break;
return m_effectStack->rowCount() > 0 ? QVariant("kdenlive-track_has_effect") : QVariant();
default:
break;
return AbstractProjectItem::getData(type);
}
return AbstractProjectItem::getData(type);
}*/
}
void ProjectClip::slotExtractImage(const QList<int> &frames)
{
......
......@@ -130,7 +130,7 @@ public:
QDomElement toXml(QDomDocument &document, bool includeMeta = false) override;
// QVariant getData(DataType type) const override;
QVariant getData(DataType type) const override;
/** @brief Sets thumbnail for this clip. */
void setThumbnail(const QImage &);
......
......@@ -625,12 +625,10 @@ Fun ProjectItemModel::requestRenameFolder_lambda(std::shared_ptr<AbstractProject
if (!currentFolder) {
return false;
}
// For correct propagation of the name change, we remove folder from parent first
auto parent = currentFolder->parent();
parent->removeChild(currentFolder);
currentFolder->setName(newName);
// Reinsert in parent
return parent->appendChild(currentFolder);
auto index = getIndexFromItem(currentFolder);
emit dataChanged(index, index, {AbstractProjectItem::DataName});
return true;
};
}
......
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