]> git.sesse.net Git - kdenlive/commitdiff
Fix backup project thumbnail not in sync
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Mon, 6 Jun 2011 15:04:31 +0000 (15:04 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Mon, 6 Jun 2011 15:04:31 +0000 (15:04 +0000)
svn path=/trunk/kdenlive/; revision=5670

src/kdenlivedoc.cpp

index 76d4e5d685b0a989d3664ce9f1f9561effab8f8b..88171504977fa907ba9c4973b96aa5da899d3c17 100644 (file)
@@ -709,6 +709,15 @@ bool KdenliveDoc::saveSceneList(const QString &path, const QString &scene, const
     file.close();
     if (!autosave) {
         cleanupBackupFiles();
+        QFileInfo info(file);
+        QString fileName = KUrl(path).fileName().section('.', 0, -2);   
+        fileName.append("-" + m_documentProperties.value("documentid"));
+        fileName.append(info.lastModified().toString("-yyyy-MM-dd-hh-mm"));
+        fileName.append(".kdenlive.png");
+        KUrl backupFile = m_projectFolder;
+        backupFile.addPath(".backup/");
+        backupFile.addPath(fileName);
+        emit saveTimelinePreview(backupFile.path());
     }
     return true;
 }
@@ -1617,8 +1626,6 @@ void KdenliveDoc::backupLastSavedVersion(const QString &path)
     fileName.append(".kdenlive");
     backupFile.addPath(fileName);
 
-    emit saveTimelinePreview(backupFile.path() + ".png");
-
     if (file.exists()) {
         // delete previous backup if it was done less than 60 seconds ago
         QFile::remove(backupFile.path());