From 7f8d9a6f873386b81520460fa82de7cc08354280 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Tue, 4 Mar 2008 12:18:52 +0000 Subject: [PATCH] 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 --- src/Buffer.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Buffer.cpp b/src/Buffer.cpp index cf8d6a0124..01c580281e 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -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; } -- 2.39.2