]> git.sesse.net Git - kdenlive/blobdiff - src/kdenlivedoc.cpp
Required changes to make Kdenlive work with some locales that have a comma (,) as...
[kdenlive] / src / kdenlivedoc.cpp
index db62a28bac1466d48c06466ba34100643402f2c1..e190123f84171a467c3b7041c07893cd4f875182 100644 (file)
@@ -389,7 +389,7 @@ QDomDocument KdenliveDoc::createEmptyDocument(QList <TrackInfo> tracks)
 
     property = doc.createElement("property");
     property.setAttribute("name", "aspect_ratio");
-    value = doc.createTextNode(QString::number(0.0));
+    value = doc.createTextNode(QString::number(0));
     property.appendChild(value);
     blk.appendChild(property);
 
@@ -961,6 +961,7 @@ void KdenliveDoc::setUrl(KUrl url)
 
 void KdenliveDoc::setModified(bool mod)
 {
+    if (isReadOnly()) return;
     if (!m_url.isEmpty() && mod && KdenliveSettings::crashrecovery()) {
         m_autoSaveTimer->start(3000);
     }
@@ -1636,6 +1637,11 @@ void KdenliveDoc::backupLastSavedVersion(const QString &path)
     }    
 }
 
+bool KdenliveDoc::isReadOnly() const
+{
+    return m_documentProperties.contains("readonly");
+}
+
 void KdenliveDoc::cleanupBackupFiles()
 {
     KUrl backupFile = m_projectFolder;