Fix path to title clips not stored

BUG: 377184
Differential revision: https://phabricator.kde.org/D17995
parent 2257c6c2
......@@ -1875,7 +1875,8 @@ void TitleWidget::itemRight()
void TitleWidget::loadTitle(QUrl url)
{
if (!url.isValid()) {
url = QFileDialog::getOpenFileUrl(this, i18n("Load Title"), QUrl::fromLocalFile(m_projectTitlePath), i18n("Kdenlive title (*.kdenlivetitle)"));
QString startFolder = KRecentDirs::dir(QStringLiteral(":KdenliveProjectsTitles"));
url = QFileDialog::getOpenFileUrl(this, i18n("Load Title"), QUrl::fromLocalFile(startFolder.isEmpty() ? m_projectTitlePath : startFolder), i18n("Kdenlive title (*.kdenlivetitle)"));
}
if (url.isValid()) {
QList<QGraphicsItem *> items = m_scene->items();
......@@ -1893,6 +1894,8 @@ void TitleWidget::loadTitle(QUrl url)
doc.setContent(&file, false);
file.close();
setXml(doc);
m_projectTitlePath = QFileInfo(file).dir().absolutePath();
KRecentDirs::add(QStringLiteral(":KdenliveProjectsTitles"), m_projectTitlePath);
}
}
......
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