]> 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>
Mon, 12 Nov 2012 06:49:52 +0000 (07:49 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Mon, 12 Nov 2012 06:49:52 +0000 (07:49 +0100)
src/Buffer.cpp
src/insets/InsetInclude.cpp
status.20x

index 9a1642396e96b65ec62f2188d987b7a1d710a589..ac4f018ac0237a7f56d5986fb3b62113906ba2fd 100644 (file)
@@ -1857,7 +1857,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);
 
        updateMacros();
 
index d161fadf50187f83c048e77acec2f1ae5c3a334c..049039a5cb3dff2f79023ad68b501aedd9ae7468 100644 (file)
@@ -919,7 +919,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());
                }
        }
index 9993101c84024eed9b8afa833f668f4516aa8f14..8b720ff0fb064ba07735e05d7514ad640e1a1ff1 100644 (file)
@@ -54,12 +54,15 @@ What's new
 
 * DOCUMENT INPUT/OUTPUT
 
+- Do not let child document's settings override master settings
+  (bug #5941).
+
 
 
 * USER INTERFACE
 
 - Fix regression in which clicking in the main work area always resets
-  the selected format in View>Source (bug #8411).
+  the selected format in View > Source (bug #8411).
   
 - When selecting text and Insert > Preview, immediately display the
   preview (bug #8075).