aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Baptiste Mardelle <[email protected]>2016-06-24 20:37:50 +0200
committerJean-Baptiste Mardelle <[email protected]>2016-06-24 20:37:50 +0200
commit67fc34952c31266cfe7589e5ffb52a307298b81a (patch)
treede575a206b1bd5190caa050d5e023fbdc2a00180
parentb3b101ea02e385d63dd269ff958557b463bf7622 (diff)
Disable editing of project's metadata name
-rw-r--r--src/project/dialogs/projectsettings.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/project/dialogs/projectsettings.cpp b/src/project/dialogs/projectsettings.cpp
index 4c657cb..b451343 100644
--- a/src/project/dialogs/projectsettings.cpp
+++ b/src/project/dialogs/projectsettings.cpp
@@ -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