]> git.lyx.org Git - features.git/commitdiff
Issue a warning if a document has two parents. We should do something smart then...
authorVincent van Ravesteijn <vfr@lyx.org>
Fri, 30 Oct 2009 15:24:35 +0000 (15:24 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Fri, 30 Oct 2009 15:24:35 +0000 (15:24 +0000)
- Do we want to ask the user which of the parents he would like to be the document's parent ?
- Do we want to disable any functionality related to parents ? Like references, bibliography, document outline etc.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31809 a592a061-630c-0410-9148-cb99ea01b6c8

src/Buffer.cpp

index 34316c1a14862abfd923e555837ae4c822c47866..85ec3d30af1e114b138c103835ac771ff5e446ed 100644 (file)
@@ -253,7 +253,11 @@ public:
                return parent_buffer; 
        }
        ///
-       void setParent(Buffer const * pb) { parent_buffer = pb; }
+       void setParent(Buffer const * pb) {
+               if (parent_buffer != pb)
+                       LYXERR0("Warning: a buffer should not have two parents!");
+               parent_buffer = pb;
+       }
 private:
        /// So we can force access via the accessors.
        mutable Buffer const * parent_buffer;