r13789 by jghali - #8081 : error in reasoning in autosave feature Autosave now writes to a .autosave file so that original file is only overwritten by user action
scribus-commit
scribus-commit at lists.scribus.net
Wed Jul 22 23:25:14 CEST 2009
Revision: 13789
Author: jghali
Date: 2009-07-22T21:24:50.289771Z
Commit message: #8081 : error in reasoning in autosave feature
Autosave now writes to a .autosave file so that original file is only overwritten by user action
Changeset:
M /branches/Version135/Scribus/scribus/scribuswin.cpp
Diffs:
Index: scribus/scribuswin.cpp
===================================================================
--- scribus/scribuswin.cpp (revision 13788)
+++ scribus/scribuswin.cpp (revision 13789)
@@ -92,11 +92,14 @@
{
if ((m_Doc->hasName) && (m_Doc->isModified()))
{
- moveFile(m_Doc->DocName, m_Doc->DocName+".bak");
+ //#8081 : change behavior of autosave, autosave writes now to an .autosave file
+ //instead of overwriting source document
+ //moveFile(m_Doc->DocName, m_Doc->DocName+".bak");
FileLoader fl(m_Doc->DocName);
- if (fl.SaveFile(m_Doc->DocName, m_Doc, 0))
+ if (fl.SaveFile(m_Doc->DocName+".autosave", m_Doc, 0))
{
- m_Doc->setModified(false);
+ //#8081 related : do not unset modified flag until user really save file
+ //m_Doc->setModified(false);
setWindowTitle(QDir::convertSeparators(m_Doc->DocName));
qApp->processEvents();
emit AutoSaved();
More information about the scribus-commit
mailing list