Hi,

the following patch add author info to .lyx file only if change tracking is 
enabled
( http://bugzilla.lyx.org/show_bug.cgi?id=3764 ).

Pavel
--- work/lyx-1.5.0beta3/src/BufferParams.cpp    2007-05-12 02:22:37.000000000 
+0200
+++ /trash/lyx-1.5.0beta3/src/BufferParams.cpp  2007-05-30 03:14:21.000000000 
+0200
@@ -770,10 +770,12 @@
        os << "\\tracking_changes " << convert<string>(trackChanges) << "\n";
        os << "\\output_changes " << convert<string>(outputChanges) << "\n";
 
-       AuthorList::Authors::const_iterator a_it = pimpl_->authorlist.begin();
-       AuthorList::Authors::const_iterator a_end = pimpl_->authorlist.end();
-       for (; a_it != a_end; ++a_it) {
-               os << "\\author " << a_it->second << "\n";
+       if (trackChanges) {
+               AuthorList::Authors::const_iterator a_it = 
pimpl_->authorlist.begin();
+               AuthorList::Authors::const_iterator a_end = 
pimpl_->authorlist.end();
+               for (; a_it != a_end; ++a_it) {
+                       os << "\\author " << a_it->second << "\n";
+               }
        }
 }
 

Reply via email to