mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 17:20:55 +00:00
* GuiDocument.cpp (dispatchParams):
- do not set master buffer and warn if the master does not include child - issue warning if the master could not be loaded. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@28035 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a7ddbf7a18
commit
f96a5217e8
@ -2365,7 +2365,19 @@ void GuiDocument::dispatchParams()
|
||||
support::onlyPath(buffer().absFileName()));
|
||||
if (isLyXFilename(master_file.absFilename())) {
|
||||
Buffer * master = checkAndLoadLyXFile(master_file);
|
||||
const_cast<Buffer &>(buffer()).setParent(master);
|
||||
if (master) {
|
||||
if (master->isChild(const_cast<Buffer *>(&buffer())))
|
||||
const_cast<Buffer &>(buffer()).setParent(master);
|
||||
else
|
||||
Alert::warning(_("Assigned master does not include this file"),
|
||||
bformat(_("You must include this file in the document\n"
|
||||
"'%1$s' in order to use the master document\n"
|
||||
"feature."), from_utf8(params().master)));
|
||||
} else
|
||||
Alert::warning(_("Could not load master"),
|
||||
bformat(_("The master document '%1$s'\n"
|
||||
"could not be loaded."),
|
||||
from_utf8(params().master)));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user