mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 02:49:46 +00:00
Do not save \origin when \save_transient_properties is false (#9958)
\origin is a transient property in the sense that in a collaborative context each co-author is going to have a different value for it. Moreover, \save_origin is a global (lyxrc) setting that cannot yet be deactivated for a single file, but one author's setting is going to impact other authors, even those who have set save_origin=false. There is only one location where lyxrc.save_origin produces an effect, modified by this patch. With this patch, everything happens as if lyxrc.save_origin was false whenever save_transient_properties=false. This is not a file format change. When a file has save_transient_properties=false but an origin is set (for instance a file produced before this patch) then the origin produces its effect before the file is saved. This produces the same effect as if the user decided to disable save_origin between two sessions.
This commit is contained in:
parent
2804011957
commit
e56820bea4
@ -1030,7 +1030,7 @@ void BufferParams::writeFile(ostream & os, Buffer const * buf) const
|
||||
to_utf8(makeRelPath(from_utf8(filepath), from_utf8(sysdir)));
|
||||
if (!prefixIs(relpath, "../") && !FileName::isAbsolute(relpath))
|
||||
filepath = addPath("/systemlyxdir", relpath);
|
||||
else if (!lyxrc.save_origin)
|
||||
else if (!save_transient_properties || !lyxrc.save_origin)
|
||||
filepath = "unavailable";
|
||||
os << "\\origin " << quoteIfNeeded(filepath) << '\n';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user