]> git.lyx.org Git - lyx.git/blobdiff - src/Buffer.cpp
GuiWrap: make the optional options really optional by checkboxes in the dialog
[lyx.git] / src / Buffer.cpp
index 91158770d57e6c7489f569db22e9cca7faec313d..186bdb03c9d495cac3346d92d8c04a6ea9bd76d0 100644 (file)
@@ -55,6 +55,7 @@
 #include "Undo.h"
 #include "version.h"
 #include "EmbeddedFiles.h"
+#include "PDFOptions.h"
 
 #include "insets/InsetBibitem.h"
 #include "insets/InsetBibtex.h"
@@ -142,7 +143,7 @@ namespace fs = boost::filesystem;
 
 namespace {
 
-int const LYX_FORMAT = 285;
+int const LYX_FORMAT = 287;
 
 } // namespace anon
 
@@ -459,6 +460,7 @@ int Buffer::readHeader(Lexer & lex)
        params().footskip.erase();
        params().listings_params.clear();
        params().clearLayoutModules();
+       params().pdfoptions().clear();
        
        for (int i = 0; i < 4; ++i) {
                params().user_defined_bullet(i) = ITEMIZE_DEFAULTS[i];
@@ -1740,7 +1742,10 @@ Buffer * Buffer::getMasterBuffer()
        if (!params().parentname.empty()
            && theBufferList().exists(params().parentname)) {
                Buffer * buf = theBufferList().getBuffer(params().parentname);
-               if (buf)
+               //We need to check if the parent is us...
+               //FIXME RECURSIVE INCLUDE
+               //This is not sufficient, since recursive includes could be downstream.
+               if (buf && buf != this)
                        return buf->getMasterBuffer();
        }