* Buffer.cpp:

- avoid wrong console message while loading a child from a master
	  that lead me on the wrong track when debugging bug 5699.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28491 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2009-02-14 14:21:59 +00:00
parent 93aff2c611
commit 37d89378ca

View File

@ -590,15 +590,22 @@ bool Buffer::readDocument(Lexer & lex)
if (isLyXFilename(master_file.absFilename())) {
Buffer * master =
checkAndLoadLyXFile(master_file, true);
// set master as master buffer, but only if we are
// a real child
if (master && master->isChild(this))
d->parent_buffer = master;
else
LYXERR0("The master '"
<< params().master
<< "' assigned to this document does not include "
"this document `" << absFileName() << "'. Ignoring the master assignment.");
if (master) {
// set master as master buffer, but only
// if we are a real child
if (master->isChild(this))
setParent(master);
// if the master is not fully loaded
// it is probably just loading this
// child. No warning needed then.
else if (master->isFullyLoaded())
LYXERR0("The master '"
<< params().master
<< "' assigned to this document '"
<< absFileName()
<< "' does not include "
"this document. Ignoring the master assignment.");
}
}
}