]> git.lyx.org Git - features.git/commitdiff
Do not let the children's buffer params leak into the master (#5941)
authorJuergen Spitzmueller <spitz@lyx.org>
Fri, 5 Oct 2012 07:59:44 +0000 (09:59 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Fri, 5 Oct 2012 07:59:44 +0000 (09:59 +0200)
src/Buffer.cpp
src/insets/InsetInclude.cpp

index 2c186553ce47ee69614b4ee295a7b23017abd711..b0db5c7136a4b906dea108c33dbd409561e9b322 100644 (file)
@@ -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)));
index 2a6f92b389d970f2f58b4cc7b4df68397fab89b3..2c0c412d04591f706e1f7018e1db6ebfb6fe9f1d 100644 (file)
@@ -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());
                }
        }