]> git.sesse.net Git - kdenlive/blobdiff - src/profilesdialog.cpp
Fix profiles dialog button:
[kdenlive] / src / profilesdialog.cpp
index 8315ca16e070c053661a3a388b5a6e76b6b9bc50..3cbd5af26452309f3030d3cb184d1be045b135e7 100644 (file)
@@ -46,6 +46,7 @@ ProfilesDialog::ProfilesDialog(QWidget * parent): QDialog(parent), m_isCustomPro
     connect(m_view.button_create, SIGNAL(clicked()), this, SLOT(slotCreateProfile()));
     connect(m_view.button_save, SIGNAL(clicked()), this, SLOT(slotSaveProfile()));
     connect(m_view.button_delete, SIGNAL(clicked()), this, SLOT(slotDeleteProfile()));
+    connect(m_view.button_default, SIGNAL(clicked()), this, SLOT(slotSetDefaultProfile()));
 }
 
 void ProfilesDialog::fillList(const QString selectedProfile) {
@@ -77,6 +78,12 @@ void ProfilesDialog::slotCreateProfile() {
     m_view.properties->setEnabled(true);
 }
 
+void ProfilesDialog::slotSetDefaultProfile() {
+    int ix = m_view.profiles_list->currentIndex();
+    QString path = m_view.profiles_list->itemData(ix).toString();
+    if (!path.isEmpty()) KdenliveSettings::setDefault_profile(path);
+}
+
 void ProfilesDialog::slotSaveProfile() {
     const QString profileDesc = m_view.description->text();
     int ix = m_view.profiles_list->findText(profileDesc);