On 10/30/2009 12:02 PM, Abdelrazak Younes wrote:
v...@lyx.org wrote:
Author: vfr
Date: Fri Oct 30 16:24:35 2009
New Revision: 31809
URL: http://www.lyx.org/trac/changeset/31809
Log:
Issue a warning if a document has two parents. We should do something
smart then, but what?
- 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.
Modified:
lyx-devel/trunk/src/Buffer.cpp
Modified: lyx-devel/trunk/src/Buffer.cpp
==============================================================================
--- lyx-devel/trunk/src/Buffer.cpp Fri Oct 30 16:14:36 2009
(r31808)
+++ lyx-devel/trunk/src/Buffer.cpp Fri Oct 30 16:24:35 2009
(r31809)
@@ -253,7 +253,11 @@
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;
+ }
That's wrong. It's perfectly OK to have two documents using the same
child. That's an important use case for me actually.
So, to ask the question I asked in the other message, which one of them
controls numbering in the child? Or is that taken care of?
rh