QTextStream out(&file);
out << doc.toString();
file.close();
- parseProfiles();
+ parseProfiles(newGroupName, newProfileName);
}
delete d;
}
QTextStream out(&file);
out << doc.toString();
file.close();
- parseProfiles();
+ parseProfiles(currentGroup);
}
void RenderWidget::slotExport() {
else m_view.buttonDelete->setEnabled(true);
}
-void RenderWidget::parseProfiles() {
+void RenderWidget::parseProfiles(QString group, QString profile) {
m_view.size_list->clear();
m_view.format_list->clear();
QString exportFile = KStandardDirs::locate("data", "kdenlive/export/profiles.xml");
exportFile = KStandardDirs::locateLocal("data", "kdenlive/export/customprofiles.xml");
parseFile(exportFile, true);
refreshView();
+ QList<QListWidgetItem *> child;
+ child = m_view.format_list->findItems(group, Qt::MatchExactly);
+ if (!child.isEmpty()) m_view.format_list->setCurrentItem(child.at(0));
+ child = m_view.size_list->findItems(profile, Qt::MatchExactly);
+ if (!child.isEmpty()) m_view.size_list->setCurrentItem(child.at(0));
}
void RenderWidget::parseFile(QString exportFile, bool editable) {
private:
Ui::RenderWidget_UI m_view;
QString m_standard;
- void parseProfiles();
+ void parseProfiles(QString group = QString(), QString profile = QString());
void parseFile(QString exportFile, bool editable);
signals: