set the buffer reference for all insets when the file is loaded.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23433 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-03-04 12:18:52 +00:00
parent 398b07a2a5
commit 7f8d9a6f87

View File

@ -696,6 +696,13 @@ bool Buffer::readFile(FileName const & filename)
if (readFile(lex, fname) != success)
return false;
// FIXME: there are insets that don't set the buffer reference
// (InsetMathHull at least) so wet explicitely set the buffer in all insets.
InsetIterator it = inset_iterator_begin(inset());
InsetIterator end = inset_iterator_end(inset());
for (; it != end; ++it)
it->setBuffer(*this);
return true;
}