diff --git a/src/ChangeLog b/src/ChangeLog index 0277bac07f..739733ea8b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-11-24 Georg Baum + + * lyxfunc.C (dispatch): propogate the bibtex databases from the + master file to any child files. Fixes bug 546. + 2003-11-24 Alfredo Braunstein * lyxfind.C (findNextChange): remove unneeded bv->text->init call diff --git a/src/lyxfunc.C b/src/lyxfunc.C index 6891eee207..9ab4ff5677 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -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; }