]> git.sesse.net Git - kdenlive/commitdiff
Fix opening of last project
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Mon, 4 Aug 2008 18:11:19 +0000 (18:11 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Mon, 4 Aug 2008 18:11:19 +0000 (18:11 +0000)
svn path=/branches/KDE4/; revision=2360

src/mainwindow.cpp

index ba08511d88d83b455b8e3cac00afc5d327f1d1f1..caa7273723ee1cae6c4cc4b57cda255b1ce0f325 100644 (file)
@@ -821,8 +821,9 @@ void MainWindow::openFile() {
 
 void MainWindow::openLastFile() {
     KSharedConfigPtr config = KGlobal::config();
-    QString Lastproject = config->group("Recent Files").readPathEntry("File1", QString());
-    openFile(KUrl(Lastproject));
+    KUrl::List urls = m_fileOpenRecent->urls();
+    if (urls.isEmpty()) newFile();
+    else openFile(urls.last());
 }
 
 void MainWindow::openFile(const KUrl &url) {