When creating new profile, focus it

svn path=/branches/KDE4/; revision=2047
parent 440f7c18
......@@ -126,7 +126,7 @@ void RenderWidget::slotSaveProfile() {
QTextStream out(&file);
out << doc.toString();
file.close();
parseProfiles();
parseProfiles(newGroupName, newProfileName);
}
delete d;
}
......@@ -173,7 +173,7 @@ void RenderWidget::slotDeleteProfile() {
QTextStream out(&file);
out << doc.toString();
file.close();
parseProfiles();
parseProfiles(currentGroup);
}
void RenderWidget::slotExport() {
......@@ -236,7 +236,7 @@ void RenderWidget::refreshParams() {
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");
......@@ -244,6 +244,11 @@ void RenderWidget::parseProfiles() {
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) {
......
......@@ -44,7 +44,7 @@ private slots:
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:
......
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