From 9b9d993fa7b46aecc5c5de0b5fba6944abf9d366 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Mardelle Date: Mon, 6 Jun 2011 15:04:31 +0000 Subject: [PATCH] Fix backup project thumbnail not in sync svn path=/trunk/kdenlive/; revision=5670 --- src/kdenlivedoc.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/kdenlivedoc.cpp b/src/kdenlivedoc.cpp index 76d4e5d6..88171504 100644 --- a/src/kdenlivedoc.cpp +++ b/src/kdenlivedoc.cpp @@ -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()); -- 2.39.2