Do not let the children's buffer params leak into the master (#5941)

This commit is contained in:
Juergen Spitzmueller 2012-10-05 09:59:44 +02:00
parent 2f7f0c7631
commit 2fa840b771
2 changed files with 7 additions and 1 deletions

View File

@ -1922,6 +1922,10 @@ int Buffer::runChktex()
void Buffer::validate(LaTeXFeatures & features) const void Buffer::validate(LaTeXFeatures & features) const
{ {
// Validate the buffer params, but not for included
// files, since they also use the parent buffer's
// params (# 5941)
if (!features.runparams().is_child)
params().validate(features); params().validate(features);
for_each(paragraphs().begin(), paragraphs().end(), for_each(paragraphs().begin(), paragraphs().end(),

View File

@ -934,7 +934,9 @@ void InsetInclude::validate(LaTeXFeatures & features) const
// otherwise it would always be the master buffer, // otherwise it would always be the master buffer,
// and nested includes would not work. // and nested includes would not work.
features.setBuffer(*tmp); features.setBuffer(*tmp);
features.runparams().is_child = true;
tmp->validate(features); tmp->validate(features);
features.runparams().is_child = false;
features.setBuffer(buffer()); features.setBuffer(buffer());
} }
} }