]> git.lyx.org Git - features.git/commitdiff
(Georg Baum): propogate BibTeX databases from the master document to
authorAngus Leeming <leeming@lyx.org>
Mon, 24 Nov 2003 20:48:21 +0000 (20:48 +0000)
committerAngus Leeming <leeming@lyx.org>
Mon, 24 Nov 2003 20:48:21 +0000 (20:48 +0000)
its children.

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

src/ChangeLog
src/lyxfunc.C

index 0277bac07f0da8eeb8c5781bbd412e7896916320..739733ea8b99786f98c73290af8fbe6eb5a5b796 100644 (file)
@@ -1,3 +1,8 @@
+2003-11-24  Georg Baum  <Georg.Baum@post.rwth-aachen.de>
+
+       * lyxfunc.C (dispatch): propogate the bibtex databases from the
+       master file to any child files. Fixes bug 546.
+
 2003-11-24  Alfredo Braunstein  <abraunst@lyx.org>
 
        * lyxfind.C (findNextChange): remove unneeded bv->text->init call
index 6891eee207efb049c2a0222d33e902c2a1d60f11..9ab4ff567758de9bbf5755145056267de9a081be 100644 (file)
@@ -1278,10 +1278,15 @@ void LyXFunc::dispatch(FuncRequest const & func, bool verbose)
                        setMessage(N_("Opening child document ") +
                                         MakeDisplayPath(filename) + "...");
                        view()->savePosition(0);
+                       string const parentfilename = owner->buffer()->fileName();
                        if (bufferlist.exists(filename))
                                view()->buffer(bufferlist.getBuffer(filename));
                        else
                                view()->loadLyXFile(filename);
+                       // Set the parent name of the child document.
+                       // This makes insertion of citations and references in the child work,
+                       // when the target is in the parent or another child document.
+                       owner->buffer()->setParentName(parentfilename);
                        break;
                }