* Buffer.cpp:

- do not set master_file as master buffer if the document s no real child (bug 5653).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28020 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2009-01-07 07:53:28 +00:00
parent c51ae2651c
commit bd934ddf3e

View File

@ -588,8 +588,17 @@ bool Buffer::readDocument(Lexer & lex)
FileName const master_file = makeAbsPath(params().master, FileName const master_file = makeAbsPath(params().master,
onlyPath(absFileName())); onlyPath(absFileName()));
if (isLyXFilename(master_file.absFilename())) { if (isLyXFilename(master_file.absFilename())) {
Buffer * master = checkAndLoadLyXFile(master_file, true); Buffer * master =
checkAndLoadLyXFile(master_file, true);
// set master as master buffer, but only if we are
// a real child
if (master->isChild(this))
d->parent_buffer = master; d->parent_buffer = master;
else
LYXERR0("The master '"
<< params().master
<< "' assigned to this document does not include "
"this document. Ignoring the master assignment.");
} }
} }