Disable editing of project's metadata name

CCBUG: 349450
parent b3b101ea
......@@ -45,6 +45,17 @@
#include <QFileDialog>
#include <QInputDialog>
class NoEditDelegate: public QStyledItemDelegate {
public:
NoEditDelegate(QObject* parent=0): QStyledItemDelegate(parent) {}
virtual QWidget* createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const {
Q_UNUSED(parent);
Q_UNUSED(option);
Q_UNUSED(index);
return 0;
}
};
ProjectSettings::ProjectSettings(KdenliveDoc *doc, QMap <QString, QString> metadata, const QStringList &lumas, int videotracks, int audiotracks, const QString &projectPath, bool readOnlyTracks, bool savedProject, QWidget * parent) :
QDialog(parent)
,m_savedProject(savedProject)
......@@ -147,6 +158,7 @@ ProjectSettings::ProjectSettings(KdenliveDoc *doc, QMap <QString, QString> metad
audio_tracks->setEnabled(false);
}
metadata_list->setItemDelegateForColumn(0, new NoEditDelegate(this));
connect(metadata_list, &QTreeWidget::itemDoubleClicked, this, &ProjectSettings::slotEditMetadata);
// Metadata list
......
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