From: Juergen Spitzmueller Date: Fri, 5 Oct 2012 07:59:44 +0000 (+0200) Subject: Do not let the children's buffer params leak into the master (#5941) X-Git-Tag: 2.1.0beta1~1462 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=2fa840b7716f5907362a1457b5ed189e675cfb57;p=features.git Do not let the children's buffer params leak into the master (#5941) --- diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 2c186553ce..b0db5c7136 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -1922,7 +1922,11 @@ int Buffer::runChktex() void Buffer::validate(LaTeXFeatures & features) const { - params().validate(features); + // 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); for_each(paragraphs().begin(), paragraphs().end(), bind(&Paragraph::validate, _1, ref(features))); diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp index 2a6f92b389..2c0c412d04 100644 --- a/src/insets/InsetInclude.cpp +++ b/src/insets/InsetInclude.cpp @@ -934,7 +934,9 @@ void InsetInclude::validate(LaTeXFeatures & features) const // otherwise it would always be the master buffer, // and nested includes would not work. features.setBuffer(*tmp); + features.runparams().is_child = true; tmp->validate(features); + features.runparams().is_child = false; features.setBuffer(buffer()); } }